Skip to main content

Markdown Preview Enhanced CVE-2026-50733

| EUVDEUVD-2026-34870 HIGH
Eval Injection (CWE-95)
2026-06-05 VulnCheck GHSA-j39p-jf99-v5w8
8.6
CVSS 4.0 · NVD
Share

Severity by source

NVD PRIMARY
8.6 HIGH
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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
A
Scope
X

Lifecycle Timeline

4
Patch available
Jun 05, 2026 - 20:02 EUVD
Source Code Evidence Fetched
Jun 05, 2026 - 18:42 vuln.today
Analysis Generated
Jun 05, 2026 - 18:42 vuln.today
CVSS changed
Jun 05, 2026 - 18:22 NVD
8.8 (HIGH) 8.6 (HIGH)

DescriptionCVE.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.

Share

CVE-2026-50733 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy