Unvalidated command dispatch in Markdown Preview Enhanced extension
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA.
Summary
Markdown Preview Enhanced for Visual Studio Code is affected before 0.8.30 because its webview message handler in src/preview-provider.ts passes attacker-controlled command names and arguments to vscode.commands.executeCommand without validation (CWE-749). JavaScript already running in the preview webview, for example through the .crossnote/head.html injection, can invoke privileged extension commands such as file modification, code-chunk execution, export tools and URL opening. Exploitation requires a separate webview JavaScript execution path, since the extension host performs no further authorization check.
Written with Claude Haiku 5.5 from the sources below · 2026-10-28
Description from the CNA
Markdown Preview Enhanced is a Markdown preview extension for Visual Studio Code. Prior to 0.8.30, the webview message handler in src/preview-provider.ts accepts an attacker-controlled command value and attacker-controlled args, constructs a command in the _crossnote namespace, and invokes vscode.commands.executeCommand without an allowlist or type validation. JavaScript already executing in the preview webview can use this bridge to invoke privileged extension commands, including file modification, code-chunk execution, export-tool execution, and arbitrary URL opening, with attacker-selected arguments. Exploitation requires a separate webview JavaScript execution path, such as the independently tracked .crossnote/head.html injection, but no further authorization check protects the extension-host command boundary. This issue is fixed in version 0.8.30.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
Update shd101wyy's vscode-markdown-preview-enhanced to version 0.8.30, which fixes this issue. Earlier versions are affected.
Written with Claude Haiku 5.5 from the sources below · 2026-10-28
- Fix · CNA vscode-markdown-preview-enhanced (shd101wyy) Fixed in 0.8.30
Timeline
- 2026-10-15 Threatist record created from CVE-2026-54702
- 2026-10-16 CISA SSVC decision points changed
- 2026-10-16 Priority changed: MEDIUM → HIGH
References
Other 4
- https://github.com/shd101wyy/vscode-markdown-preview-enhanced/security/advisories/GHSA-83c6-hcjv-pvmg
- https://github.com/shd101wyy/vscode-markdown-preview-enhanced/pull/2323
- https://github.com/shd101wyy/vscode-markdown-preview-enhanced/commit/8bc848b6cbb42b9f35a0f95f7c3bf29b8302970e
- https://github.com/shd101wyy/vscode-markdown-preview-enhanced/releases/tag/0.8.30
More shd101wyy vulnerabilities
- TI-2025-40425 An issue in Visual Studio Code Extensions Markdown Preview Enhanced v0.8.18 allows… CVSS 3.1HIGH 8.8
- TI-2026-74453 Sandbox escape in Markdown Preview Enhanced allows code execution CVSS 4.0HIGH 8.5
- TI-2026-37396 Markdown Preview Enhanced Arbitrary Code Execution via WaveDrom eval() CVSS 4.0HIGH 8.6
- TI-2026-09857 Markdown Preview Enhanced 0.8.x Code Injection via WaveDrom Rendering CVSS 4.0HIGH 8.4
- TI-2026-74454 Cross-site scripting in Markdown Preview Enhanced VS Code extension CVSS 4.0MEDIUM 6.9
- TI-2026-74456 Arbitrary file write in Markdown Preview Enhanced for VS Code CVSS 4.0MEDIUM 5.8
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences