Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
4DescriptionCVE.org
Markdown Preview Enhanced before 0.8.28 parses WaveDrom diagrams by evaluating untrusted markdown content with eval(), allowing arbitrary JavaScript execution. The flaw affects every render path - the live preview (window.eval) and presentation mode plus HTML export (the bundled WaveDrom.ProcessAll()/eva() helpers) - and can also be triggered through a <script type="WaveDrom"> element injected via raw HTML in markdown. When a victim previews or exports a crafted markdown document, an attacker can execute arbitrary code, leading to arbitrary file write. Fixed in 0.8.28 by parsing with JSON5.parse() and sanitizing WaveDrom data scripts to inert strict JSON.
AnalysisAI
Remote code execution in the Markdown Preview Enhanced extension (versions before 0.8.28) allows attackers to run arbitrary JavaScript when a victim previews or exports a crafted markdown document containing a WaveDrom diagram. The flaw stems from the renderer evaluating untrusted markdown content with eval() across every render path - live preview, presentation mode, and HTML export - and can also be triggered via raw HTML <script type="WaveDrom"> injection. No public exploit identified at time of analysis; EPSS data was not provided, but the high CVSS 4.0 score (8.6) and trivial trigger via a shared markdown file make this a meaningful risk for developer workstations.
Technical ContextAI
Markdown Preview Enhanced is a popular VS Code/Atom extension (publisher shd101wyy) that renders enhanced markdown with diagram support, including WaveDrom timing diagrams and Bitfield register diagrams. The root cause maps to CWE-95 (Improper Neutralization of Directives in Dynamically Evaluated Code, aka 'Eval Injection'): the WaveDrom integration parsed diagram source by calling JavaScript's eval() (window.eval in the live preview and the bundled WaveDrom.ProcessAll()/eva() helpers in presentation mode and HTML export), treating attacker-supplied diagram text as code rather than data. A parallel issue in the Bitfield renderer used interpretJS()/vm.runInNewContext, compounding the eval-injection surface. The CPE cpe:2.3:a:shd101wyy:markdown_preview_enhanced covers all versions prior to 0.8.28.
RemediationAI
Vendor-released patch: upgrade Markdown Preview Enhanced to 0.8.28 or later, which replaces eval() with JSON5.parse() in the live preview and normalizes every WaveDrom data script to inert strict JSON in the HTML sanitizer so downstream eval/ProcessAll cannot execute attacker-controlled code; the same release also fixes the parallel Bitfield interpretJS() eval-injection. Update via the VS Code Marketplace or by pulling crossnote 0.9.29+ as documented at https://github.com/shd101wyy/vscode-markdown-preview-enhanced/releases/tag/0.8.28. As an interim compensating control where immediate upgrade is not possible, disable or uninstall the extension on workstations that open markdown from untrusted sources, or instruct users not to preview/export markdown files received from outside the team - accepting the trade-off of losing live preview functionality. Avoid relying on workspace trust alone, since the eval triggers on routine preview and export actions rather than requiring explicit code execution consent.
More in Markdown Preview Enhanced
View allAn issue in Markdown Preview Enhanced v0.6.5 and v0.19.6 for VSCode and Atom allows attackers to execute arbitrary comma
Markdown Preview Enhanced v0.6.5 and v0.19.6 for VSCode and Atom was discovered to contain a command injection vulnerabi
An issue in Visual Studio Code Extensions Markdown Preview Enhanced v0.8.18 allows attackers to execute arbitrary code v
Arbitrary code execution in Markdown Preview Enhanced (shd101wyy) before 0.8.28 lets a crafted markdown document run att
Remote code execution in Markdown Preview Enhanced before 0.8.28 on Windows allows attackers to inject OS commands throu
Arbitrary JavaScript execution in the Markdown Preview Enhanced VS Code extension (0.8.x, bundling crossnote 0.9.28) is
Same weakness CWE-95 – Eval Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-34870
GHSA-j39p-jf99-v5w8