Skip to main content

Markdown Preview Enhanced EUVDEUVD-2026-34869

| CVE-2026-49493 HIGH
Code Injection (CWE-94)
2026-06-05 VulnCheck GHSA-m5v2-jw65-jh59
8.6
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Craft markdown with malicious bitfield block
  2. Delivery
    Deliver via repo, PR, or attachment
  3. Exploit
    Victim opens preview or exports document
  4. Execution
    interpretJS calls vm.runInNewContext
  5. Persist
    Arbitrary JS executes in extension host
  6. Impact
    Steal source/credentials or pivot

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the victim to have Markdown Preview Enhanced (vscode-markdown-preview-enhanced) at a version below 0.8.28 installed and to actively render or export a markdown document supplied by the attacker - the CVSS UI:A flag corresponds to the victim invoking the 'Open Preview' command or one of the HTML/PDF/Presentation export paths. The malicious document must contain a Bitfield fenced code block (`bitfield ... `) whose body is crafted to execute via vm.runInNewContext(); no authentication, no privileges, and no special workspace trust configuration are required, but the attack is not triggered merely by the file existing on disk - it requires the user-driven render/export action. Limits on exploitation: users who never use the preview/export commands on untrusted markdown, or who have already upgraded to 0.8.28 (crossnote 0.9.29), are not exposed.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:A, VC/VI/VA:H, SC/SI/SA:N) describes a network-reachable, low-complexity, unauthenticated bug with full confidentiality, integrity, and availability impact on the vulnerable component, but it explicitly requires Active user interaction - a victim must open or export a malicious markdown document. There is no EPSS score provided and the CVE is not in CISA KEV, so this is not confirmed actively exploited; no public exploit identified at time of analysis. Realistic risk is high for developer and documentation workflows because Markdown Preview Enhanced is widely installed, markdown files routinely travel through repos, issue trackers, and shared drives, and the exploit primitive (RCE on render) requires no privileges and no exotic configuration. Net assessment: prioritize patching for any environment where developers preview or export untrusted markdown, but the UI:A requirement and absence of KEV/EPSS evidence put it below true wormable RCEs.

Exploit ScenarioDerived

An attacker commits a README.md or design-doc markdown file containing a malicious `bitfield fenced block whose body is a JavaScript payload rather than a register definition. A developer clones the repo and opens the preview in VS Code (or exports the document to HTML/PDF), at which point interpretJS() evaluates the payload via vm.runInNewContext() and runs arbitrary code in the extension host process - leading to local file theft, source-code exfiltration, or a foothold for further compromise. No public exploit identified at time of analysis, but the fix commit and release notes describe the unsafe sink concretely enough that a working PoC is 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

Arbitrary code execution in Markdown Preview Enhanced (shd101wyy) before 0.8.28 lets a crafted markdown document run attacker-controlled JavaScript when rendered or exported, because Bitfield fenced code blocks were evaluated through interpretJS() / vm.runInNewContext() instead of being parsed as data. CVSS 4.0 scores this 8.6 with network vector and active user interaction; no public exploit identified at time of analysis and the CVE is not listed in CISA KEV.

RemediationAI

Vendor-released patch: upgrade Markdown Preview Enhanced to 0.8.28 or later (which pulls in crossnote 0.9.29), per the release at https://github.com/shd101wyy/vscode-markdown-preview-enhanced/releases/tag/0.8.28 and the VulnCheck advisory at https://www.vulncheck.com/advisories/markdown-preview-enhanced-arbitrary-code-execution-via-bitfield-interpretjs. Until the upgrade is rolled out, compensating controls include disabling or uninstalling the Markdown Preview Enhanced extension on machines that handle untrusted markdown (trade-off: loss of diagram/preview functionality), avoiding the 'open preview' and HTML/PDF export commands on markdown originating from external sources such as cloned repos, email attachments, or downloaded gists, and configuring code review or repo-scan rules to reject markdown containing `bitfield (and `wavedrom, which the same release patches) fenced blocks pending the upgrade; note the markdown-scanning approach can be bypassed by attribute or whitespace variations, so it is a stopgap rather than a substitute for patching.

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 markdown rendering extension (available for VS Code and Atom) maintained by shd101wyy, identified by CPE cpe:2.3:a:shd101wyy:markdown_preview_enhanced. The extension supports embedded diagrams via fenced code blocks, including Bitfield register diagrams. Pre-0.8.28 the Bitfield renderer passed the block body to an interpretJS() helper that ultimately called Node's vm.runInNewContext(), turning what should be a static data island (arrays of register-field objects) into an arbitrary JavaScript execution context. This is a textbook CWE-94 (Improper Control of Generation of Code, 'Code Injection'): untrusted input is concatenated into a code-evaluation API. The 0.8.28 release replaces interpretJS() with JSON5.parse(), and the same release also patches a parallel eval()-based RCE in the WaveDrom renderer (issue #2315) and a Windows command-injection issue in external link opening, indicating a broader audit of unsafe parsers.

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 Bitfield fenced code blocks with interpretJS(), which evaluates the block content as code via vm.runInNewContext(), allowing arbitrary code execution. A crafted markdown document containing a malicious bitfield code block executes attacker-controlled code on the server side when the document is rendered or exported. Fixed in 0.8.28 by parsing bitfield register definitions with JSON5.parse(), since they are purely data.

Executive ViewAI

Why It Matters

Markdown Preview Enhanced contains a critical arbitrary code execution vulnerability enabling attackers to compromise user systems through distribution of malicious markdown files that execute code when previewed or exported. Development teams and markdown-dependent users face direct system compromise risk. With no security patch currently available, immediate containment measures are required to reduce organizational exposure.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: restrict markdown preview operations to internally-trusted document sources only; disable extension for non-markdown-dependent users; require administrative review of markdown files from external sources before user access; establish daily monitoring of Markdown Preview Enhanced official releases for patch availability.

Threat Intelligence Overview

EPSS Score
0.1%
Top 79% 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
None
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