Description
Markdown Preview Enhanced is a Markdown preview extension for Visual Studio Code. Prior to 0.8.30, the _crossnote.updateMarkdown command in Markdown Preview Enhanced accepts an arbitrary URI and attacker-controlled content, then passes them to vscode.workspace.fs.writeFile without validating that the target is the Markdown file represented by the current preview. JavaScript already executing in the preview webview can invoke this command through the extension message bridge and write any file permitted by the VS Code user's operating-system privileges, including user configuration, startup, source, and build files. This file-write vulnerability requires a separate webview JavaScript execution path, such as the independently tracked head.html injection and blind command-dispatch weaknesses. This issue is fixed in version 0.8.30.
Published: 2026-10-14
Score: 5.8 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Arbitrary File Write
Action: Update Extension
AI Analysis

Impact

Markdown Preview Enhanced is a Visual Studio Code extension that renders Markdown in a webview. The extension’s hidden _crossnote.updateMarkdown command accepts an arbitrary URI and attacker‑controlled content and forwards those to vscode.workspace.fs.writeFile without validating that the target file is the one currently previewed. Because a JavaScript context can invoke this command through the extension’s message bridge, an attacker who can make the user load malicious webview content can write any file the VS Code user has permission to modify, including configuration, startup scripts, source files, and build artifacts. The weakness is a type‑of‑weakness problem described by CWE‑73 (Improper Validation of File Name or Path).

Affected Systems

The flaw affects the vscode‑markdown‑preview‑enhanced extension by shd101wyy for Visual Studio Code. All installed versions before 0.8.30 are vulnerable. Any user who has the extension installed and has enabled its message‑bridge capability for webviews is at risk.

Risk and Exploitability

The CVSS base score of 5.8 indicates moderate severity. The EPSS score is not available, and the flaw is not listed in CISA’s KEV catalog, suggesting limited public exploitation. However, exploitation requires a separate webview JavaScript execution path, such as the head.html injection or blind command‑dispatch weaknesses that are tracked independently. Once that prerequisite is met, the attacker can write arbitrary files with the privileges of the VS Code user, potentially leading to persistence, code tampering, or compromise of user configuration.

Generated by OpenCVE AI on October 15, 2026 at 14:00 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the vscode‑markdown‑preview‑enhanced extension to version 0.8.30 or later, which restores proper path validation for the updateMarkdown command.
  • If the upgrade cannot be performed immediately, uninstall the extension from VS Code to eliminate the vulnerable command from the environment.
  • Configure VS Code to block JavaScript execution inside webviews—for example, enable workspace trust or disable the preview .html feature—so that a malicious webview cannot invoke the updateMarkdown command until the patch is applied.

Generated by OpenCVE AI on October 15, 2026 at 14:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 15 Oct 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 14 Oct 2026 19:30:00 +0000

Type Values Removed Values Added
Description Markdown Preview Enhanced is a Markdown preview extension for Visual Studio Code. Prior to 0.8.30, the _crossnote.updateMarkdown command in Markdown Preview Enhanced accepts an arbitrary URI and attacker-controlled content, then passes them to vscode.workspace.fs.writeFile without validating that the target is the Markdown file represented by the current preview. JavaScript already executing in the preview webview can invoke this command through the extension message bridge and write any file permitted by the VS Code user's operating-system privileges, including user configuration, startup, source, and build files. This file-write vulnerability requires a separate webview JavaScript execution path, such as the independently tracked head.html injection and blind command-dispatch weaknesses. This issue is fixed in version 0.8.30.
Title Markdown Preview Enhanced: Arbitrary File Write via updateMarkdown Command Without Path Validation
Weaknesses CWE-73
References
Metrics cvssV4_0

{'score': 5.8, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-15T14:21:40.113Z

Reserved: 2026-06-15T22:58:06.563Z

Link: CVE-2026-54703

cve-icon Vulnrichment

Updated: 2026-10-15T14:18:58.883Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-14T20:17:47.913

Modified: 2026-10-16T20:02:37.630

Link: CVE-2026-54703

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-15T14:15:15Z

Weaknesses
  • CWE-73

    External Control of File Name or Path