CVE-2026-54701 Markdown Preview Enhanced: Stored XSS via Unsanitized `.crossnote/head.html` Injection in Webview

Medium 6.9 Published Updated

Attackers can execute arbitrary scripts in VS Code by injecting malicious HTML into repository files, potentially compromising the extension host.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2026-54701?

CVE-2026-54701 is a medium-severity cross-site scripting vulnerability in shd101wyy vscode-markdown-preview-enhanced, published on 14 Oct 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-79

Which versions are affected by CVE-2026-54701?

How do I fix CVE-2026-54701?

No fix has been published for CVE-2026-54701 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-54701 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54701 exists.

Sources

Also known as GHSA-mcwg-4j78-qwv3.

Is CVE-2026-54701 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free