Skip to main content

Markdown Preview Enhanced EUVDEUVD-2026-101584

| CVE-2026-54701 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-10-14 security-advisories@github.com
6.9
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Victim opens malicious repository locally
  2. Delivery
    Open Markdown preview in VS Code
  3. Exploit
    head.html script injected into webview head
  4. Execution
    Executes before DOMPurify/CSP initialize
  5. Persist
    Reaches acquireVsCodeApi, messages extension host
  6. Impact
    Abuse host command dispatch for impact

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires: (1) the Markdown Preview Enhanced extension installed in VS Code; (2) the victim opening/cloning an attacker-controlled repository that contains a .crossnote/head.html file with script-capable markup; and (3) the victim opening a Markdown preview for a file in that repository (UI:P - merely opening the preview triggers it; no click in the notification or preview is needed). Limiting factors: the vector is local (the malicious repo must be present on the victim's machine), the specific .crossnote/head.html path must exist in the repo, and the extension must be installed and used to render a preview - there is no remote network trigger. Only versions prior to 0.8.30 are affected.

Impact

This is a moderate-severity, developer-targeted vulnerability rather than a mass-exploitation priority. The vendor CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P, score 6.9) correctly frames it as locally-vectored and requiring passive user interaction: exploitation depends on a victim cloning/opening a malicious repository and opening its Markdown preview, not on a remotely reachable network service. No EPSS score, CISA KEV listing, or SSVC decision data was provided, and no public exploit was referenced - so there is no public exploit identified at time of analysis and no evidence of active or automatable exploitation. The impact is meaningful: injected scripts in .crossnote/head.html execute before React, DOMPurify, and CSP defenses initialize, and can reach acquireVsCodeApi() to message the extension host, which (per the companion fix for blind command dispatch) could be chained toward arbitrary command invocation and file writes. This aligns with the vendor's VI:H (high integrity impact) while confidentiality/availability remain low. Net: a legitimate issue worth patching for anyone opening untrusted repositories, but its local vector and required user interaction keep it below the urgency of a network-exploitable flaw. Note the attack vector is local/UI-gated, so the raw '6.9' should not be read as remotely wormable.

Exploit ScenarioDerived

An attacker publishes a malicious repository containing a crafted .crossnote/head.html with embedded script markup. A developer with Markdown Preview Enhanced installed clones the repo and opens any Markdown file's preview; the injected script runs in the webview head before DOMPurify/CSP load and calls acquireVsCodeApi() to post messages to the extension host. No additional click in the notification or preview is required, and no public exploit code was referenced in the provided data.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 14, 2026

Script injection in Markdown Preview Enhanced (a Visual Studio Code extension) before 0.8.30 lets a malicious repository execute attacker-controlled JavaScript inside the preview webview as soon as a victim opens a Markdown preview. Because the injected code runs before the React application and DOMPurify are initialized, it can reach acquireVsCodeApi() and send arbitrary messages to the extension host, giving an attacker host-level command influence (integrity impact is rated High in the assessed vector). Exploitation requires the extension to be installed, the victim to have an attacker-controlled repository on disk, and the victim to open a preview of a Markdown file in that repository - the preview itself is the trigger and no further click is needed. No public exploit code has been identified at time of analysis and the issue is not confirmed as actively exploited (no CISA KEV listing); the vendor-released fix is 0.8.30, which upgrades the bundled crossnote library to 0.9.31.

RemediationAI

Vendor-released patch: upgrade Markdown Preview Enhanced to version 0.8.30 (vscode-markdown-preview-enhanced release 0.8.30) or later, which bumps the bundled crossnote dependency to 0.9.31 and removes all <script> tags from .crossnote/head.html before they are injected into the webview head; consumers of the standalone crossnote package should move to 0.9.31 (commit 8c55a2ba3365712a1caa4abeece0383bc2994d48, PR shd101wyy/crossnote#444) for the underlying fix. The equivalent extension-side change is commit 8bc848b6cbb42b9f35a0f95f7c3bf29b8302970e (PR shd101wyy/vscode-markdown-preview-enhanced#2323) and the advisory is at https://github.com/shd101wyy/vscode-markdown-preview-enhanced/security/advisories/GHSA-mcwg-4j78-qwv3. Because the malicious content lives in the repository, users who cannot update immediately should avoid opening Markdown previews for Markdown files inside untrusted or freshly cloned repositories, and should inspect or delete any .crossnote/head.html file in such repositories before previewing - after the fix, <style>, <meta>, and <link> tags in head.html still work, but <script> tags are stripped, so legitimate custom JavaScript in head.html will stop running (including in HTML and eBook exports generated through the same helper), which is the intended trade-off. Organizations can additionally isolate previewing of untrusted repositories to a container or disposable VM, since the vector is local and depends on the malicious repository being present on the developer's machine. Note that patching also closes a related blind command-dispatch issue in the webview message handler that is fixed in the same 0.8.30 / 0.9.31 release, so the upgrade should be treated as a combined hardening step rather than a single-line fix.

Affected VersionsENISA

vscode-markdown-preview-enhanced < 0.8.30

Affected Packages

euvd vscode_markdown_preview_enhanced fix: 0.8.30

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

The flaw is a cross-site scripting class issue (CWE-79) arising from improper neutralization of repository-controlled markup during web page generation. Markdown Preview Enhanced reads a per-repository configuration file, .crossnote/head.html, and passes its contents through the internal resolvePathsInHeader() helper before injecting them into the <head> element of the preview webview document. Prior to the fix, that helper rewrote relative script paths but performed no sanitization, so any script-capable markup present in head.html was inserted verbatim into the webview. Because the injection occurs in the document head during load, it executes before the React preview application and before DOMPurify or content-security-policy defenses are active, which is the core reason the sanitization used for normal Markdown rendering did not protect this path. From inside the webview, injected script can walk React internals to obtain acquireVsCodeApi() and use the webview-to-extension postMessage channel to reach the extension host. The upstream commit in crossnote (8c55a2ba3365712a1caa4abeece0383bc2994d48) replaces the script-path-rewriting logic with unconditional removal of all <script> elements from head content, and notes that the same shared helper is used by the HTML and eBook export paths, so scripts in head.html are now also stripped from exported documents. The same release additionally hardens the webview message handler by enforcing an allowlist of 37 legitimate commands, validating that arguments are arrays, and constraining the updateMarkdown command to the preview's own source URI and to markdown file extensions, closing a related blind command-dispatch weakness.

Know when Visual Studio Code 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

Vendor (github) PRIMARY 6.9 MEDIUM
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
vuln.today AI 6.6 MEDIUM

AV:L and UI:R because the victim must locally open a malicious repo's preview; PR:N as no authentication is needed; VI:H since injected script reaches the extension host via acquireVsCodeApi.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
High
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Oct 14, 2026 - 20:34 EUVD
CVE Published
Oct 14, 2026 - 20:17 cve.org
MEDIUM 6.9

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.2%
Top 90% exploitable
Prevalence
High
very popular VS Code Markdown extension, millions of developer installs
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
High

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

CVE-2022-41034 HIGH POC
7.8 Oct 11

Visual Studio Code Remote Code Execution Vulnerability. Rated high severity (CVSS 7.8), this vulnerability is no authent

CVE-2022-30129 HIGH POC
8.8 May 10

Visual Studio Code Remote Code Execution Vulnerability. Rated high severity (CVSS 8.8), this vulnerability is remotely e

CVE-2026-81376 CRITICAL
9.6 Sep 08

Security-feature bypass in Microsoft Visual Studio Code before 1.136.2 lets a remote, unauthenticated attacker defeat a

CVE-2026-102238 CRITICAL
9.6 Oct 13

Remote code execution in Visual Studio Code (versions 1.0.0 up to but not including 1.141.1) is achievable through a pat

CVE-2026-47281 CRITICAL
9.6 Jun 09

Privilege escalation in Microsoft Visual Studio Code allows remote unauthenticated attackers to elevate privileges over

CVE-2021-43891 HIGH
7.8 Dec 15

Visual Studio Code Remote Code Execution Vulnerability. Rated high severity (CVSS 7.8), this vulnerability is no authent

CVE-2026-57102 HIGH
8.8 Jul 14

Security-feature bypass in Microsoft Visual Studio Code lets a remote attacker deliver functionality from an untrusted c

CVE-2026-59113 HIGH
8.8 Aug 11

Remote code execution in Visual Studio Code (versions 1.0.0 through 1.132.0) is enabled by a missing authorization check

CVE-2026-69370 HIGH
8.8 Oct 13

Command injection in Visual Studio Code 1.0.0 through 1.141.0 allows an unauthenticated remote attacker to execute arbit

CVE-2026-70336 HIGH
8.8 Aug 11

Remote code execution in Microsoft Visual Studio Code allows a network-based attacker to inject and execute arbitrary co

CVE-2026-102235 HIGH
8.8 Oct 13

Remote code execution in Visual Studio Code versions 1.0.0 through 1.141.1 allows an unauthenticated, network-positioned

CVE-2026-78462 HIGH
8.8 Sep 08

Authorization bypass in Visual Studio Code versions 1.0.0 through 1.136.1 allows an unauthenticated network attacker to

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy