Skip to main content

Markdown Preview Enhanced CVE-2026-54702

| EUVDEUVD-2026-101585 HIGH
Exposed Dangerous Method or Function (CWE-749)
2026-10-14 security-advisories@github.com
7.3
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 repo in VS Code
  2. Delivery
    head.html injects script into preview webview
  3. Exploit
    Bridge dispatches unvalidated _crossnote command
  4. Execution
    Extension host executes privileged command with attacker args
  5. Impact
    File write or code-chunk execution achieves code execution

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Dangerous method exposure prevention
Exploitation Conditions

Exploitation requires a pre-existing webview JavaScript execution primitive inside the Markdown Preview Enhanced preview pane - specifically the independently tracked .crossnote/head.html script injection, or any equivalent path that reaches acquireVsCodeApi(). The victim must open attacker-controlled content (a malicious repository/Markdown file) in VS Code with the extension installed and render its preview, which supplies the passive user interaction (UI:P) the vector requires. Given that primitive, no authorization check protects the extension-host command boundary: the handler accepts any _crossnote.{command} with arbitrary args. LIMITING FACTORS: this is not remotely exploitable on its own (AV:L, AT:P), it is gated behind a second vulnerability, and both halves are remediated in 0.8.30 (the allowlist here plus the head.html <script>-stripping fix), so a fully patched install removes both the bridge abuse and its most practical trigger.

Impact

This is a genuine but conditional risk rather than a drop-everything emergency. The CVSS 4.0 vector (AV:L/AC:L/AT:P/PR:N/UI:P, score 7.3 HIGH) encodes the key nuance: although privileges are not required (PR:N), the Attack Requirements metric is set to Present (AT:P) and user interaction is Passive (UI:P), reflecting that this bug is not independently exploitable. The description states plainly that exploitation 'requires a separate webview JavaScript execution path, such as the independently tracked .crossnote/head.html injection' - so CVE-2026-54702 is the second half of an exploit chain, not a standalone RCE. No EPSS score, no CISA KEV listing, and no public exploit were provided in the input, so this is 'no public exploit identified at time of analysis.' The single 'RCE' tag is accurate in outcome (the bridge can reach file modification and code-chunk execution) but overstates immediacy, since a webview-compromise primitive must be obtained first. Signals are internally consistent: a local attack vector, a required precondition, and the absence of exploitation telemetry all point to a high-impact-but-gated issue appropriate for prompt patching rather than panic. Note the chained dependency explicitly - risk is realized only where the companion head.html injection (GHSA-mcwg-4j78-qwv3, fixed in the same 0.8.30 release) or an equivalent webview-script primitive is also present.

Exploit ScenarioDerived

A developer clones or opens an attacker-controlled repository in VS Code and previews a Markdown file with Markdown Preview Enhanced. A malicious .crossnote/head.html in the repo injects script into the preview webview, which then abuses the unvalidated _crossnote message bridge to dispatch privileged extension-host commands (e.g. updateMarkdown, chromeExport/pandocExport) with attacker-chosen arguments, enabling file writes and code-chunk/export-tool execution on the victim's machine. No public exploit code was identified in the provided data, though the companion head.html injection it chains with is independently documented.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.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

Markdown Preview Enhanced, the VS Code Markdown preview extension, fails to validate webview-to-extension-host messages prior to version 0.8.30: the handler in src/preview-provider.ts accepts any attacker-supplied _crossnote.{command} plus arbitrary args and forwards it to vscode.commands.executeCommand with no allowlist or type checking. JavaScript already running inside the preview webview - obtainable via the separately tracked .crossnote/head.html script-injection flaw (GHSA-mcwg-4j78-qwv3) - can therefore invoke privileged extension commands such as updateMarkdown, chromeExport, pandocExport, and runCodeChunk with attacker-selected arguments, enabling file writes, code-chunk execution, export-tool execution, and arbitrary URL opening within the victim's workspace context. Exploitation is conditional rather than standalone: it requires a pre-existing webview JavaScript execution primitive and a victim who opens and previews attacker-controlled repository content, and no public exploit code has been identified at time of analysis; both the bridge-abuse bug and its most practical trigger are resolved in 0.8.30.

RemediationAI

Vendor-released patch: upgrade Markdown Preview Enhanced to 0.8.30, which enforces the 37-command webview allowlist, validates that args is an array, binds updateMarkdown to the preview's own source URI, and restricts writes to configured markdown file extensions (release tag and commit 8bc848b6 / PR 2323 at github.com/shd101wyy/vscode-markdown-preview-enhanced). Because this CVE is only reachable through a second webview JavaScript primitive, 0.8.30 must be applied as a single package fix: the same release strips <script> tags from .crossnote/head.html content in resolvePathsInHeader(), closing the most practical trigger for GHSA-mcwg-4j78-qwv3, while <style>, <meta>, and <link> tags continue to function so preview theming is unaffected. If immediate upgrade is not possible, compensating controls carry real trade-offs: treat opening untrusted repositories or Markdown files with an active preview as untrusted code execution on the developer workstation, disable the extension (or its preview) for untrusted workspaces - which removes the attack surface entirely but also removes Markdown preview functionality - and avoid relying on the extension's export and code-chunk features (chromeExport, pandocExport, runCodeChunk) in any session where untrusted content has been previewed, since a compromised webview can invoke them with attacker-chosen arguments. Note that file-extension validation added in 0.8.30 blocks writes to non-markdown targets such as .bashrc and authorized_keys, so older builds offer no equivalent guard against updateMarkdown abuse; there is no configuration-only equivalent of the allowlist. Full details are in the vendor advisories at github.com/shd101wyy/vscode-markdown-preview-enhanced/security/advisories/GHSA-83c6-hcjv-pvmg and GHSA-mcwg-4j78-qwv3.

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

CWE-749 (Exposed Dangerous Method or Function) captures the root cause precisely: a trust boundary between the sandboxed VS Code webview and the privileged extension host is crossed by a message bridge that was never constrained. VS Code extensions render preview content in a webview (an isolated iframe context) that communicates back to the Node.js extension host via acquireVsCodeApi().postMessage(); the extension host's onDidReceiveMessage handler is the security choke point, because it runs with full extension privileges. Markdown Preview Enhanced's handler constructed a command name in the _crossnote namespace from the message payload and called vscode.commands.executeCommand directly, so any code that could postMessage - including injected scripts - could reach commands like updateMarkdown (arbitrary file write), chromeExport/pandocExport/eBookExport (export tooling with attacker-controlled parameters), runCodeChunk (code-chunk execution), and openExternalEditor/openInBrowser (URL opening). The upstream fix in commit 8bc848b6 (PR #2323, shipped in 0.8.30 and bundled with crossnote 0.9.31) introduces a strict 37-command allowlist of legitimate webview messages (WEBVIEW_MESSAGE_COMMANDS), drops anything not on the list, validates that args is always an array, restricts updateMarkdown so the target URI matches the preview's own source URI, and additionally requires the target path to carry a configured markdown file extension - blocking writes to files like .bashrc or authorized_keys. The webview-side trigger (.crossnote/head.html injected raw into <head> before React and any DOMPurify/CSP defenses) is separately hardened by stripping <script> tags in resolvePathsInHeader(). The CVSS 4.0 vector (AV:L/AC:L/AT:P/PR:N/UI:P) reflects local attack entry with a pre-existing condition (AT:P) - the second vulnerability - and passive user interaction; the independent assessment's CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H is consistent with the same conditional, user-driven, non-remote characteristics.

Know when the next one hits your stack

  • 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 7.3 HIGH
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.0 HIGH

AC:H because exploitation depends on first obtaining a separate webview-script primitive; AV:L and UI:R because the victim must open malicious local content; PR:N as no prior auth is needed; C/I/A:H from file write and code execution.

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

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
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
HIGH 7.3

DescriptionCVE.org

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.

Technical POC Analysis

CWE-749 (Exposed Dangerous Method or Function).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A high-severity validation flaw in the Markdown Preview Enhanced extension for Visual Studio Code (CVE-2026-54702, CVSS 7.3) allows malicious Markdown content in a repository to reach privileged extension commands, giving an attacker the ability to write files, execute code chunks, invoke export tooling, and open arbitrary URLs under the permissions of the developer who previews it. Anyone on the engineering, data science, or DevOps staff who clones and previews third-party or otherwise untrusted repository content is a potential entry point, putting source code, credentials, and any internal system reachable from that workstation at risk. No public exploit identified at time of analysis, but exploitation depends on chaining with a separate webview script-injection issue, so teams that routinely open external code carry real exposure.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 89% exploitable
Prevalence
Medium
very popular VS Code markdown extension, but developer-only, not server infrastructure
Data Quality
6 sources
Confidence: High

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 HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

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

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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