CVE-2026-54525: Markdown Preview Enhanced: One Click RCE via Markdown Link Command Injection on Windows
Markdown Preview Enhanced is a Markdown preview extension for Visual Studio Code. Prior to 0.8.28, Markdown Preview Enhanced preview-link handling passes a decoded, Markdown-controlled link target to a Windows file-opening helper that invokes childprocess.exec with the start command. When a Windows user opens an untrusted Markdown file and clicks a crafted external or unsupported-scheme link, shell metacharacters in the decoded target are interpreted by cmd.exe as command separators, allowing an attacker-selected command to run with the privileges of the current VS Code user. The attack requires one normal preview-link click but does not require malicious workspace configuration, script execution to be enabled, or additional files. This issue is fixed in version 0.8.28.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Markdown Preview Enhancedto a version that resolves this vulnerability.Fixed in 0.8.28
Event History
Frequently Asked Questions
Who is exposed to this issue?
Windows users of Markdown Preview Enhanced versions earlier than 0.8.28 are exposed when they open an untrusted Markdown file and click a crafted external or unsupported-scheme link in the preview. The resulting command runs with the privileges of the current VS Code user.
What does an attacker need to exploit it?
An attacker needs to provide a Markdown file containing a crafted link and persuade the user to click that link in the Markdown preview. No malicious workspace configuration, enabled script execution, or additional files are required.
Are default protections such as disabled script execution sufficient mitigation?
No. Exploitation does not require script execution to be enabled or a malicious workspace configuration, so those settings do not prevent this issue.
What should users do if they cannot update immediately?
Do not open or click preview links from untrusted Markdown files, particularly external or unsupported-scheme links, on Windows. Update Markdown Preview Enhanced to version 0.8.28 when possible.