CVE-2025-65716
8.8Microsoft · Visual Studio Code Markdown Preview Enhanced Extension
The Markdown Preview Enhanced extension for Visual Studio Code is vulnerable to arbitrary code execution via a crafted .Md file.
Executive summary
A critical vulnerability in the Visual Studio Code Markdown Preview Enhanced extension allows unauthenticated attackers to achieve arbitrary code execution on the host system.
Vulnerability
The flaw allows an unauthenticated attacker to execute arbitrary code by enticing a user to open a maliciously crafted Markdown (.Md) file. This vulnerability involves an improper handling of file content during the preview process.
Business impact
Successful exploitation allows an attacker to execute arbitrary code with the privileges of the user running Visual Studio Code. This can lead to total system compromise, data theft, and lateral movement within the corporate network. With a CVSS score of 8.8, this vulnerability poses a high risk to organizational security and infrastructure integrity.
Remediation
Immediate Action: Users should immediately disable or uninstall the Markdown Preview Enhanced extension until a security update is released by the vendor.
Proactive Monitoring: Security teams should monitor workstation endpoint logs for suspicious child processes spawned by the Visual Studio Code executable.
Compensating Controls: Implement strict file validation policies and user awareness training to prevent the opening of untrusted Markdown files from unknown or external sources.
Exploitation status
Public Exploit Available: Yes, a published proof of concept exists, as documented in the security research write-up referenced by the CVE record.
Analyst recommendation
Given the severity of potential remote code execution, organizations must prioritize the mitigation of this extension. Until a verified patch is provided, removing the extension is the only effective way to eliminate the risk of exploitation. Administrators should communicate this requirement to all developers and personnel utilizing Visual Studio Code immediately.