Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft markdown with shell metacharacters in filename/import/latex_engine attribute
-
DeliveryDeliver via PR, email, or repo clone
-
ExploitVictim opens preview on Windows MPE <0.8.28
-
ExecutionExtension passes attribute through cmd.exe shell
-
PersistInjected OS commands execute as the user
-
ImpactEstablish foothold on developer workstation
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques 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 | Exploitation requires three concrete conditions all present in the CVE description: (1) the victim runs Markdown Preview Enhanced before 0.8.28 on Windows - the description explicitly states the shell-injection path only reaches OS command execution on Windows; (2) the victim opens a preview of the attacker's markdown document (UI:A in the CVSS vector) - passive receipt of the file is not enough; (3) the malicious markdown must populate one of three specific sinks: a diagram block's filename attribute, an @import file path, or the latex_engine attribute on a code chunk. No authentication is required (PR:N) and attack complexity is low (AC:L). Limiting factors that reduce realistic risk: non-Windows installs (macOS/Linux) are not affected per the description, users who preview only their own markdown are not exposed, and organizations that disable the extension or block preview of untrusted files neutralize the chain. |
| Impact | CVSS 4.0 scores this 8.6 with vector AV:N/AC:L/AT:N/PR:N/UI:A and high confidentiality/integrity/availability impact, reflecting that delivery is over the network (a markdown file from any untrusted source) but the victim must open the preview (UI:A) - a realistic outcome for a tool whose entire purpose is previewing untrusted markdown. The vulnerability is not listed in CISA KEV and no EPSS score is supplied, so quantitative exploitation probability is unknown; no public exploit identified at time of analysis, though VulnCheck's coordinated advisory describes the injection sinks precisely. Real-world risk is concentrated on Windows developers and technical writers who routinely preview markdown received via email, pull requests, or cloned repositories - a population that overlaps with high-value targets. The CVSS vector indicates network attack vector but actual delivery is file-based social engineering, which defenders should weigh when prioritizing. |
| Exploit ScenarioDerived | An attacker authors a markdown file containing, for example, a Mermaid or PlantUML diagram block whose filename attribute embeds Windows shell metacharacters (e.g. a value chained with & or | to a second command), then delivers the file via a pull request, email attachment, or public repository. When a Windows developer opens the file and Markdown Preview Enhanced renders it, the shell-invoked open path concatenates the attacker-controlled value into a command line and cmd.exe executes the attached payload under the user's session. No public exploit identified at time of analysis, but the VulnCheck advisory and the release notes name the exact injectable attributes, making proof-of-concept development trivial. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 05, 2026
Remote code execution in Markdown Preview Enhanced before 0.8.28 on Windows allows attackers to inject OS commands through crafted markdown documents that abuse the diagram filename attribute, imported file paths, or the latex_engine code-chunk attribute, all of which were passed through a shell without validation. Exploitation requires the victim to preview the malicious document (UI:A), and no public exploit identified at time of analysis, though VulnCheck-published advisory details and a tagged fix release make weaponization straightforward.
RemediationAI
Vendor-released patch: upgrade Markdown Preview Enhanced to 0.8.28 or later (https://github.com/shd101wyy/vscode-markdown-preview-enhanced/releases/tag/0.8.28), which spawns child processes with literal argv arrays and validates the diagram filename, @import paths, and latex_engine attributes before use; the bundled crossnote 0.9.29 upgrade also closes the related WaveDrom and Bitfield eval()/vm.runInNewContext RCE paths. Until the upgrade is rolled out, compensating controls for Windows users include disabling automatic preview on file open and refusing to preview markdown from untrusted sources (mail attachments, third-party PRs, cloned repos), which preserves editing but loses on-save preview; reviewing markdown as plain text via a non-rendering editor view eliminates the sink at the cost of formatting fidelity; and on managed fleets, restricting the extension via VS Code extension allow/deny policies removes the attack surface entirely at the cost of the feature. Cross-reference the VulnCheck advisory at https://www.vulncheck.com/advisories/markdown-preview-enhanced-os-command-injection-in-external-file-and-link-opening for indicators.
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 (shd101wyy/vscode-markdown-preview-enhanced per the CPE cpe:2.3:a:shd101wyy:markdown_preview_enhanced) that renders markdown with extended diagram, LaTeX, and import features. The root cause is CWE-78 (OS Command Injection): the extension invoked the OS shell to open external files/links and forwarded user-controlled values - diagram filename attributes, @import file paths, and the latex_engine attribute on code chunks - directly into shell command strings. On Windows, cmd.exe metacharacters embedded in those attributes are interpreted by the shell rather than treated as filename literals. The 0.8.28 release fixes this by spawning child processes with arguments passed as a literal argv array and by validating the inputs before use, and it also bundles unrelated fixes for eval()-based RCE in the WaveDrom and Bitfield renderers via crossnote 0.9.29.
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
3DescriptionCVE.org
Markdown Preview Enhanced before 0.8.28 opens external files and links from the preview through a shell and does not validate untrusted inputs taken from the markdown document - the diagram filename attribute, imported file paths, and the latex_engine code-chunk attribute. On Windows, a crafted markdown document can inject operating system commands that execute when the document is previewed. Fixed in 0.8.28 by passing these inputs as literal arguments instead of through a shell and validating them before use.
Executive ViewAI
Markdown Preview Enhanced for Windows contains a high-severity remote code execution vulnerability (CVSS 8.6) triggered by previewing malicious documents. Currently no public exploit identified, but developers are at immediate risk of system compromise, potentially exposing source code and credentials. Organizations using this extension across development teams face significant operational security risk.
No vendor-released patch identified at time of analysis. Interim mitigations: disable Markdown Preview Enhanced extension, disable diagram rendering and LaTeX processing in any markdown tool, restrict document sources to internal approved materials, enforce sandbox or container-based markdown processing, and monitor vendor release schedules for version 0.8.28.
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
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
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 the Markdown Preview Enhanced extension (versions before 0.8.28) allows attackers to run arbitr
Arbitrary JavaScript execution in the Markdown Preview Enhanced VS Code extension (0.8.x, bundling crossnote 0.9.28) is
EUVD-2026-34868
GHSA-3vxg-8vgp-994w
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB