CVE-2026-54703: Markdown Preview Enhanced: Arbitrary File Write via updateMarkdown Command Without Path Validation

Published Oct 14, 2026
·
Updated

Markdown Preview Enhanced is a Markdown preview extension for Visual Studio Code. Prior to 0.8.30, the crossnote.updateMarkdown command in Markdown Preview Enhanced accepts an arbitrary URI and attacker-controlled content, then passes them to vscode.workspace.fs.writeFile without validating that the target is the Markdown file represented by the current preview. JavaScript already executing in the preview webview can invoke this command through the extension message bridge and write any file permitted by the VS Code user's operating-system privileges, including user configuration, startup, source, and build files. This file-write vulnerability requires a separate webview JavaScript execution path, such as the independently tracked head.html injection and blind command-dispatch weaknesses. This issue is fixed in version 0.8.30.

Affected Software

1 affected component
Markdown Preview Enhanced<0.8.30

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Markdown Preview Enhanced to a version that resolves this vulnerability.

    Fixed in 0.8.30

Event History

Oct 14, 2026
CVE Published
via MITRE·07:09 PM
Data Sourced
via MITRE·07:09 PM
DescriptionWeakness

Frequently Asked Questions

1

What must an attacker achieve before this file-write flaw can be exploited?

JavaScript must already be executing in the Markdown preview webview through a separate weakness, such as head.html injection or blind command dispatch. That code can then use the extension message bridge to invoke the vulnerable command.

2

What systems and files are at risk?

Any VS Code environment running a version prior to 0.8.30 is affected when attacker-controlled JavaScript can execute in the preview webview. The attacker can write files that the VS Code user is permitted to modify, including configuration, startup, source, and build files.

3

What should be done if an immediate update is not possible?

Prevent untrusted content from obtaining JavaScript execution in the Markdown preview webview, particularly through known paths such as head.html injection or blind command dispatch. Restricting the privileges of the operating-system account running VS Code also limits which files could be overwritten.

4

How can I determine whether the installed extension is vulnerable?

Check the installed Markdown Preview Enhanced version. Versions earlier than 0.8.30 are affected; version 0.8.30 contains the fix.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203