Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessVictim opens malicious markdown repository
-
DeliveryInject script via unsanitized head.html
-
ExploitWebview bridge invokes _crossnote.updateMarkdown
-
ExecutionWrite arbitrary file (e.g. .bashrc)
-
ImpactAttacker code runs with user privileges
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File name/path control
|
| Exploitation Conditions | Exploitation requires that the victim open attacker-controlled Markdown/repository content in a VS Code workspace with Markdown Preview Enhanced (< 0.8.30) active, AND that the attacker already has JavaScript executing inside the preview webview - this is not inherent to this CVE and must be obtained via a separate flaw such as the .crossnote/head.html script injection (GHSA-mcwg-4j78-qwv3) or the blind command-dispatch weakness fixed in the same release. Given that chained context, the attacker can call _crossnote.updateMarkdown with an arbitrary target URI because pre-0.8.30 code did not verify the URI matched the preview's own source file nor enforce a markdown file extension. Limiting factors: local attack vector (malicious content must be opened by the user), the mandatory second execution-path vulnerability, and that writes are bounded by the VS Code user's OS filesystem privileges. |
| Impact | This is a moderate, conditional risk rather than a drop-everything priority. The vendor CVSS 4.0 vector (AV:L/AC:L/AT:P/PR:N/UI:P, VC:N/VI:H/VA:H) scores 5.8 (Medium), and the signals are internally consistent with the description: AV:L and AT:P reflect that exploitation is not a standalone remote attack but requires a local/attacker-supplied context plus a separate precondition. Crucially, the description states this file-write is NOT independently exploitable - it requires a separate webview JavaScript execution path (the independently tracked head.html script injection and blind command-dispatch weaknesses, fixed in the same 0.8.30 release). No EPSS score, CISA KEV listing, or public POC was provided in the input, so there is no evidence of active or at-scale exploitation; the 'RCE' tag reflects the realistic end impact (writing startup/config files) rather than a direct single-shot remote code execution. The dependency on chaining, combined with AV:L and required user interaction (opening a malicious repository/preview), substantially limits real-world risk despite the high integrity/availability impact. Note a minor signal nuance: the input tag is 'RCE' while CWE-73 and the fix describe an arbitrary file-write primitive - code execution is a downstream consequence, not the primitive itself. |
| Exploit ScenarioDerived | A developer opens a malicious or compromised repository in VS Code that is rendered by Markdown Preview Enhanced. Using a chained webview JavaScript execution flaw (e.g., head.html script injection), attacker-controlled code in the preview webview invokes _crossnote.updateMarkdown through the extension message bridge to write an arbitrary file - such as ~/.bashrc, authorized_keys, or a build/startup script - which executes with the user's OS privileges. No public exploit code was identified at time of analysis, and exploitation depends on the separate, now-patched execution path. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 14, 2026
Arbitrary file write in the Markdown Preview Enhanced extension for Visual Studio Code (all versions before 0.8.30) lets JavaScript already running inside a preview webview invoke the _crossnote.updateMarkdown command with an arbitrary target URI and attacker-supplied content; the extension then hands both straight to vscode.workspace.fs.writeFile, so configuration, startup, source, and build files can be overwritten within the limits of the VS Code user's operating-system privileges. Exploitation is conditional rather than standalone: remote attackers need no credentials per the CVSS PR:N vector, but the victim must open attacker-controlled Markdown or repository content with the extension active, and the attacker must first obtain a separate webview JavaScript execution path such as the .crossnote/head.html script injection or the blind command-dispatch weakness fixed in the same release. No public exploit code and no confirmed active exploitation were identified at time of analysis, and a vendor patch exists in 0.8.30, making this a moderate, conditional risk rather than a drop-everything priority.
RemediationAI
Vendor-released patch: upgrade Markdown Preview Enhanced to 0.8.30 or later, which is the version that adds the webview command allowlist, the source-URI match for updateMarkdown, the Markdown-extension restriction, and the head.html <script> stripping; the vendor advisory is at https://github.com/shd101wyy/vscode-markdown-preview-enhanced/security/advisories/GHSA-82rc-7g3m-2c42 and the release notes and code change are at https://github.com/shd101wyy/vscode-markdown-preview-enhanced/releases/tag/0.8.30, https://github.com/shd101wyy/vscode-markdown-preview-enhanced/pull/2323, and commit 8bc848b6cbb42b9f35a0f95f7c3bf29b8302970e. Until the upgrade can be rolled out, keep untrusted repositories in VS Code Restricted Mode so the extension host cannot activate in that workspace, avoid opening Markdown files or repositories from untrusted sources, and consider disabling or uninstalling the extension in environments that process untrusted content - the trade-off being loss of preview, export, and code-chunk functionality. Removing or sanitizing any .crossnote/head.html in cloned repositories before opening them also closes the injection path this CVE depends on, at the cost of losing legitimate custom header styling; note that these controls only block the prerequisite webview execution path, since the underlying arbitrary-write primitive itself is only truly eliminated by patching to 0.8.30.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-73 (External Control of File Name or Path): the extension message bridge in preview-provider.ts blindly dispatched any _crossnote.<command> message coming from the webview, forwarding attacker-controlled arguments without checking that the command was one the webview legitimately sends or that args was an array. For the _crossnote.updateMarkdown path in extension-common.ts, the target URI was never compared against the URI of the Markdown file being previewed, and no file-extension check was applied, so a compromised webview could point the write at .bashrc, authorized_keys, VS Code settings/startup files, or project source and build files. The vulnerability is therefore a privileged file-write primitive that depends on an independent webview code-execution flaw; the same 0.8.30 release also strips <script> tags from .crossnote/head.html before it is injected into the webview <head> (GHSA-mcwg-4j78-qwv3), addressing the injection path that scripts must traverse before they can reach acquireVsCodeApi() and the message bridge. The fix introduces a strict allowlist of 37 webview-dispatched commands, enforces that args is always an array, requires updateMarkdown targets to match the preview's own source URI, and restricts writes to extensions listed in the markdownFileExtensions configuration; the release also bumps the underlying crossnote dependency from 0.9.30 to 0.9.31.
Know when Visual Studio Code gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
AV:L and UI:R because a user must open malicious content; AC:H because exploitation depends on chaining a separate webview JS execution flaw; PR:N as no authentication is needed; C:N with I:H/A:H for arbitrary file write.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
More in Visual Studio Code
View allVisual Studio Code Remote Code Execution Vulnerability. Rated high severity (CVSS 7.8), this vulnerability is no authent
Visual Studio Code Remote Code Execution Vulnerability. Rated high severity (CVSS 8.8), this vulnerability is remotely e
Security-feature bypass in Microsoft Visual Studio Code before 1.136.2 lets a remote, unauthenticated attacker defeat a
Remote code execution in Visual Studio Code (versions 1.0.0 up to but not including 1.141.1) is achievable through a pat
Privilege escalation in Microsoft Visual Studio Code allows remote unauthenticated attackers to elevate privileges over
Visual Studio Code Remote Code Execution Vulnerability. Rated high severity (CVSS 7.8), this vulnerability is no authent
Security-feature bypass in Microsoft Visual Studio Code lets a remote attacker deliver functionality from an untrusted c
Remote code execution in Visual Studio Code (versions 1.0.0 through 1.132.0) is enabled by a missing authorization check
Command injection in Visual Studio Code 1.0.0 through 1.141.0 allows an unauthenticated remote attacker to execute arbit
Remote code execution in Microsoft Visual Studio Code allows a network-based attacker to inject and execute arbitrary co
Remote code execution in Visual Studio Code versions 1.0.0 through 1.141.1 allows an unauthenticated, network-positioned
Authorization bypass in Visual Studio Code versions 1.0.0 through 1.136.1 allows an unauthenticated network attacker to
EUVD-2026-101583
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB