Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthor markdown with malicious WaveDrom block
-
DeliveryDeliver via repo, PR, or shared docs
-
ExploitVictim opens preview or exports HTML
-
Executioneval() executes attacker JavaScript
-
PersistArbitrary code runs in extension host
-
ImpactArbitrary file write on developer workstation
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Eval input sanitization
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Victim must have Markdown Preview Enhanced (shd101wyy) prior to 0.8.28 installed in VS Code (or the legacy Atom build) and must take one of these actions on attacker-supplied markdown: open the live preview pane, switch to presentation mode, or run HTML export. The malicious payload must be embedded as a WaveDrom diagram - either a |
| Impact | The CVSS 4.0 vector AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H indicates network-reachable, low-complexity, unauthenticated exploitation that requires active user interaction (opening or previewing a malicious markdown file) with high impact to confidentiality, integrity, and availability of the victim host. The vulnerability is not listed in CISA KEV, no EPSS score was provided in the input, and no public exploit identified at time of analysis - though the technique (eval of WaveDrom JSON-like content) is trivially reproducible from the vendor's own release notes describing the fix. Real-world risk is concentrated on developer endpoints where markdown files arrive from untrusted sources (pull requests, shared repos, documentation downloads); for closed teams writing their own markdown, residual risk is lower. The UI:A interaction requirement and developer-tool scope keep this below worm-grade urgency but well above a theoretical issue. |
| Exploit ScenarioDerived | An attacker commits a markdown file containing a crafted |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 05, 2026
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.
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.
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
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.
Know when Markdown Preview Enhanced 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:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Primary rating from Vendor (VulnCheck) · only source for this CVE.
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.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.
Executive ViewAI
Markdown Preview Enhanced extension contains a remote code execution vulnerability affecting developer workstations. Attackers can execute arbitrary JavaScript on developer machines through routine file-sharing workflows (email, repositories), enabling theft of source code, credentials, and development infrastructure compromise.
No vendor-released patch identified at time of analysis. Disable Markdown Preview Enhanced extension immediately. Implement email and file-sharing gateway controls to detect and quarantine markdown files from external sources. Educate developers to avoid previewing untrusted markdown documents. Enforce principle of least privilege on developer workstations to limit impact of potential code execution.
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 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
EUVD-2026-34870
GHSA-j39p-jf99-v5w8
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB