Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessVictim clones/opens malicious repository
-
DeliveryOpen Markdown file loads .crossnote config/parser
-
Exploitvm.runInNewContext evaluates untrusted JS
-
ExecutionPrototype traversal reaches Function/process
-
ImpactExecute OS commands as victim account
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the victim to open a Markdown file inside an attacker-controlled repository that contains malicious .crossnote/config.js and/or .crossnote/parser.js files, with the Markdown Preview Enhanced extension (prior to 0.8.29 / crossnote prior to 0.9.30) installed in VS Code. The config and parser-hook files are loaded automatically on file open - no further user action, and no module-scoped require, is needed. Limiting factors: the attacker must get their repository onto the victim's machine and the victim must open a Markdown file from it (UI:P / local vector), so this is not remotely triggerable against a default install without that interaction. Default extension behavior auto-evaluates these workspace files, so no special non-default configuration is required on the victim side. |
| Impact | This is a genuine high-priority issue for developer environments, though it is not a mass-exploitable network flaw. The vendor-assigned CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P, VC:H/VI:H/VA:H, score 8.5) is internally consistent with the description: exploitation is local in the CVSS sense (it requires a malicious repository to be present and a Markdown file within it to be opened), requires no privileges or prior authentication, but does require passive user interaction (UI:P). The technical impact is maximal - full arbitrary OS command execution as the victim account via prototype-chain traversal from the vm.runInNewContext sandbox to the host Function constructor and process object - which the C/I/A:H ratings correctly reflect. No EPSS score was provided and the vulnerability is NOT on CISA KEV, and no public exploit was supplied in the intelligence, so there is no evidence of active or widespread exploitation; the root-cause and fix are well documented in the GitHub Security Advisory (GHSA-427h-jhpr-8jch) and the patch commits. The realistic risk is targeted social-engineering (luring a developer into cloning/opening a malicious repo), not opportunistic internet-wide attack. SC/SI/SA:N indicate no modeled impact beyond the victim's own account, but in practice code execution as a developer is a serious foothold. Net: treat as a priority patch for anyone using this extension, while recognizing it depends on attacker-supplied repository content plus the victim opening a file. |
| Exploit ScenarioDerived | An attacker publishes a malicious repository (e.g., a tempting sample project, fork, or template) containing crafted .crossnote/config.js or .crossnote/parser.js files. When a developer clones it and opens any Markdown file with the Markdown Preview Enhanced extension, those files are automatically evaluated via vm.runInNewContext, and prototype-chain traversal reaches the host Function constructor and process object to run OS commands as the victim. No public exploit was provided in the intelligence, but the GitHub advisory and commit history describe the mechanism precisely, making weaponization straightforward. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 14, 2026
Remote code execution in Markdown Preview Enhanced (a Visual Studio Code Markdown preview extension) before 0.8.29 lets a malicious repository run operating-system commands as the victim's account the moment the victim opens a Markdown file from that repository. The extension automatically evaluates repository-controlled .crossnote/config.js and .crossnote/parser.js files through vm.runInNewContext, and prototype-chain traversal escapes the Node.js host realm to reach the Function constructor and the process object - no further interaction and no module-scoped require are needed, and both the configuration-evaluation and parser-hook paths are affected. The vector requires local placement of the repository plus user interaction (opening the file), so it is not mass-exploitable over the network against a default install; there is no CISA KEV listing and no public exploit identified at time of analysis. The issue is fixed in Markdown Preview Enhanced 0.8.29, which bundles crossnote 0.9.30.
RemediationAI
Vendor-released patch: upgrade Markdown Preview Enhanced to 0.8.29 or later, which bundles crossnote 0.9.30 and evaluates .crossnote/config.js and .crossnote/parser.js inside a QuickJS WebAssembly sandbox instead of the Node.js vm realm (see https://github.com/shd101wyy/vscode-markdown-preview-enhanced/releases/tag/0.8.29 and https://github.com/shd101wyy/crossnote/releases/tag/0.9.30). If immediate upgrade is not possible, the most effective compensating control is to keep untrusted repositories in VS Code Restricted Mode (Workspace Trust) and decline trust prompts for externally sourced repos, and to inspect or remove any .crossnote/ directory before opening a Markdown file from a cloned repository - the trade-off is that Restricted Mode disables the extension's active features (preview rendering, @import/wikilink resolution, custom parser hooks), so developers lose functionality in those workspaces. Blocking the .crossnote paths via file-system or SCM policy prevents the auto-loaded payload but does not stop a hand-crafted repo from being opened outside those controls. Disabling or uninstalling the Markdown Preview Enhanced extension eliminates the exposure entirely at the cost of losing Markdown preview functionality. Because this is a local, interaction-gated vector rather than a remotely exploitable service flaw, patching the extension is the cleanest path and no network-level mitigation is required.
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-94 (Improper Control of Generation of Code / Code Injection). Markdown Preview Enhanced delegates rendering to the crossnote library, which evaluated the workspace files .crossnote/config.js and .crossnote/parser.js using Node.js's vm.runInNewContext. Node.js explicitly documents the vm module as not being a security mechanism - it isolates scope but shares the same host realm, so objects reachable from the sandboxed script still carry references into host prototypes. The attacker's script performed prototype-chain traversal (e.g., walking constructor chains from a reachable object) to obtain the host Function constructor, and from there reached the process object, enabling arbitrary command execution in the extension host process. Because the escape works from the global object graph rather than through module scope, the absence of module-scoped require inside the vm context provided no protection. The fix replaces the vm/sval evaluation with a QuickJS WebAssembly sandbox (quickjs-emscripten-core 0.32.0 and @jitl/quickjs-singlefile-cjs-release-sync), a genuinely separate JavaScript engine whose objects cannot reference Node.js host prototypes, and drops the previous sval/acorn-based evaluator. The affected component is the crossnote engine (versions prior to 0.9.30) shipped inside the VS Code extension (versions prior to 0.8.29); no CPE strings were provided in the source data.
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:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Requires a local malicious repository and the victim opening a Markdown file (AV:L, UI:R), no privileges (PR:N); sandbox escape yields full OS command execution so C/I/A:H, no scope change.
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.29, Markdown Preview Enhanced evaluates repository-controlled .crossnote/config.js and .crossnote/parser.js files with vm.runInNewContext, which does not provide a security boundary from the Node.js host realm. Opening a Markdown file in a malicious repository automatically loads these files, and prototype-chain traversal can reach the host Function constructor and process object, allowing operating-system commands to execute as the victim account without further interaction. Both configuration evaluation and parser-hook evaluation are affected, and the attack does not depend on module-scoped require being available. This issue is fixed in version 0.8.29.
Technical POC Analysis
CWE-94 (Improper Control of Generation of Code / Code Injection).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Markdown Preview Enhanced, a widely used Visual Studio Code extension, contains a high-severity remote code execution flaw (CVSS 8.5) that lets a malicious repository execute operating-system commands as the developer's own account the moment a Markdown file from that repository is opened. Any developer, contractor, or build workstation running an affected version and opening untrusted third-party code - routine during dependency review, vendor audits, and open-source contribution - is exposed to full user-level compromise. Leadership should care because a single ordinary file-open can lead to credential and token theft, source code exfiltration, and lateral movement from developer endpoints that typically carry privileged access to production systems.
Apply vendor patch: upgrade to Markdown Preview Enhanced 0.8.29 (bundles crossnote 0.9.30). Where upgrade cannot be completed immediately, disable the extension on exposed hosts, enable VS Code Workspace Trust / Restricted Mode so untrusted repositories cannot trigger extension evaluation of repository-controlled .crossnote files, and block the opening of Markdown files from untrusted or unverified repositories until remediation is complete.
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
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
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-101582
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB