Skip to main content

Markdown Preview Enhanced EUVDEUVD-2026-34870

| CVE-2026-50733 HIGH
Eval Injection (CWE-95)
2026-06-05 VulnCheck GHSA-j39p-jf99-v5w8
8.6
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Author markdown with malicious WaveDrom block
  2. Delivery
    Deliver via repo, PR, or shared docs
  3. Exploit
    Victim opens preview or exports HTML
  4. Execution
    eval() executes attacker JavaScript
  5. Persist
    Arbitrary code runs in extension host
  6. Impact
    Arbitrary 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 `wavedrom fenced code block whose content is parsed by eval()/window.eval, or a raw HTML <script type="WaveDrom"> tag picked up by the bundled WaveDrom.ProcessAll()/eva() helpers during presentation or export. No authentication to any service is required (PR:N) and no special non-default configuration is needed since WaveDrom rendering is a built-in render path, but exploitation is gated by the UI:A interaction (the developer must preview or export the document) and is limited to systems where this specific extension is installed.

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 `wavedrom fenced block (or a raw <script type="WaveDrom"> element) into a public repository, documentation bundle, or pull request, with the WaveDrom 'source' field carrying JavaScript payload instead of legitimate signal-definition JSON. A developer clones the repo and opens the file in VS Code with Markdown Preview Enhanced installed, or clicks Preview/Export-to-HTML; eval() runs the attacker payload in the extension host context, yielding arbitrary code execution and the arbitrary file write noted in the description. No public exploit identified at time of analysis, but the vendor's own release notes describing the unsafe eval call paths make a working PoC straightforward to construct.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Markdown Preview Enhanced 0 <0.8.28

Affected Packages

euvd markdown_preview_enhanced fix: 0.8.28

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

Vendor (VulnCheck) 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

Primary rating from Vendor (VulnCheck) · only source for this CVE.

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Jun 05, 2026 - 20:02 EUVD
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.

Executive ViewAI

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.1%
Top 81% exploitable
Social Media
2
Sightings
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

43
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +43
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

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.

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