Cross-site scripting in Markdown Preview Enhanced VS Code extension
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · High · Low
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-79.
Summary
Markdown Preview Enhanced for Visual Studio Code is affected before 0.8.30. It inserts the repository-controlled .crossnote/head.html file into the preview head without removing executable content (CWE-79). Opening a Markdown preview in a malicious repository runs the injected script with no further click. The script can call acquireVsCodeApi to send messages from the webview to the extension host.
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, Markdown Preview Enhanced reads repository-controlled .crossnote/head.html content and passes it through resolvePathsInHeader before inserting it into the head of the preview webview document without removing executable content. Script-capable markup executes while the document loads, before the React application and DOMPurify initialize, and can access acquireVsCodeApi to send messages from the webview to the extension host. Opening a Markdown preview in a malicious repository is sufficient to trigger the injected content, and no additional click within the notification or preview is required. 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
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
Update the vscode-markdown-preview-enhanced extension to version 0.8.30.
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-54701
- 2026-10-16 Priority changed: MEDIUM → LOW
- 2026-10-20 CISA SSVC decision points changed
- 2026-10-20 Priority changed: LOW → MEDIUM
References
Other 7
- https://github.com/shd101wyy/vscode-markdown-preview-enhanced/security/advisories/GHSA-mcwg-4j78-qwv3
- https://github.com/shd101wyy/crossnote/pull/444
- https://github.com/shd101wyy/vscode-markdown-preview-enhanced/pull/2323
- https://github.com/shd101wyy/crossnote/commit/8c55a2ba3365712a1caa4abeece0383bc2994d48
- https://github.com/shd101wyy/vscode-markdown-preview-enhanced/commit/8bc848b6cbb42b9f35a0f95f7c3bf29b8302970e
- https://github.com/shd101wyy/crossnote/releases/tag/0.9.31
- 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-74455 Unvalidated command dispatch in Markdown Preview Enhanced extension CVSS 4.0HIGH 7.3
- 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