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.
Published: 2026-10-14
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

Impact

The vulnerability allows an attacker to embed malicious script payloads in a repository-controlled .crossnote/head.html file, which the Markdown Preview Enhanced extension injects into the preview webview without sanitization. The injected code executes while the document loads, before the React application and DOMPurify are initialized, and can access the acquireVsCodeApi API. Through that API, the attacker can send arbitrary messages from the webview to the extension host, potentially enabling execution of arbitrary code with the extension’s privileges.

Affected Systems

The issue affects the shd101wyy vscode-markdown-preview-enhanced extension for Visual Studio Code. Any installation of a version prior to 0.8.30 is vulnerable. Users of version 0.8.30 or later have the fix applied.

Risk and Exploitability

The CVSS score for this flaw is 6.9, indicating moderate severity, and there is no EPSS score available. It is not listed in the CISA KEV catalog. Because the vulnerability is triggered simply by opening a Markdown preview in a malicious repository, no additional user interaction is required. An attacker only needs to host a repository with a crafted .crossnote/head.html file and entice a victim to preview a markdown file in that repository. Once the preview is rendered, the injected script runs with the extension’s context, allowing remote code execution inside the extension host.

Generated by OpenCVE AI on October 15, 2026 at 13:31 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update to Markdown Preview Enhanced v0.8.30 or later to eliminate the stored XSS vulnerability.
  • Configure Visual Studio Code’s workspace trust settings to disallow loading previews from untrusted repositories, thereby limiting where the extension can inject content.
  • If an immediate update is not possible, disable or uninstall the Markdown Preview Enhanced extension to remove the vulnerable attack surface.

Generated by OpenCVE AI on October 15, 2026 at 13:31 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 20 Oct 2026 02:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 14 Oct 2026 19:30:00 +0000

Type Values Removed Values Added
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.
Title Markdown Preview Enhanced: Stored XSS via Unsanitized `.crossnote/head.html` Injection in Webview
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-20T02:01:15.836Z

Reserved: 2026-06-15T22:58:06.563Z

Link: CVE-2026-54701

cve-icon Vulnrichment

Updated: 2026-10-20T02:01:10.301Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-14T20:17:47.580

Modified: 2026-10-20T03:17:15.347

Link: CVE-2026-54701

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-15T13:45:19Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')