Impact
Markdown Preview Enhanced processes organization-controlled .crossnote/config.js and .crossnote/parser.js files using Node.js' vm.runInNewContext, which does not isolate the executed code from the host environment. This lets the injected JavaScript traverse prototypes and access the Function constructor and the process object, enabling an attacker to embed malicious code within a repository’s Markdown that causes arbitrary operating‑system commands to run under the user’s account when the file is previewed. The flaw is a false‑sandbox code injection (CWE-94) and results in remote code execution.
Affected Systems
Any user who installs the unsecured version of the Markdown Preview Enhanced extension from Microsoft Visual Studio Code is affected. Versions earlier than 0.8.29 contain the vulnerability. The extension vendor is shd101wyy, and the affected product is the vscode-markdown-preview-enhanced extension. Users running the extension on any operating system that hosts Node.js and which opens Markdown files from untrusted repositories are at risk.
Risk and Exploitability
With a CVSS score of 8.5 the vulnerability is considered high severity. There is no EPSS data available, and the issue is not yet listed in CISA’s KEV catalog. Attackers can exploit the flaw simply by hosting a malicious repository and having a victim open a Markdown file for preview. Because the code is evaluated without user interaction, the attack vector is passive and does not require any privilege escalation beyond the victim’s user context.
OpenCVE Enrichment