Visual Studio Code Remote Code Execution Vulnerability (CVE-2026-121664)
Visual Studio Code failed to neutralise input when generating an extension's details page, allowing a cross-site scripting issue. A remote attacker could persuade a user to open a crafted extension details page and click a malicious link, which could run code as the user without the extension being installed.
Originally disclosed on Microsoft
Description
Improper neutralization of input during web page generation ('cross-site scripting') in Visual Studio Code allows an unauthorized attacker to execute code over a network.
FAQ
How could an attacker exploit this vulnerability? A remote attacker could convince a user to open a specially crafted extension's details page in Visual Studio Code and select a malicious link. Successful exploitation could allow the attacker to execute code in the context of the user without installing the extension. The attacker does not need privileges on the user's system.
FAQ
According to the CVSS metric, the attack complexity is high (AC:H). What does that mean for this vulnerability? Successful exploitation depends on specific conditions in the user's Visual Studio Code environment, including an already-open integrated terminal. The attacker must also rely on the user viewing the affected extension's details page in a particular platform-compatibility state.
Visual Studio Code
Visual Studio Code
Microsoft
Microsoft
Customer Action Required
Yes
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the extension details page rendered attacker-influenced content without proper neutralisation, leading to cross-site scripting.
Impact
Exploitation could let an attacker execute code in the context of the user without installing the extension, but only when specific conditions hold, such as an already-open integrated terminal and a particular platform-compatibility state on the details page.
What the attacker needed
Victim opens a crafted extension details page; victim selects a malicious link; an integrated terminal is already open; details page in a specific compatibility state
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Visual Studio Code is a popular code editor, and extensions are add-ons you can browse inside it. The page that shows an extension's details did not properly clean up what it displayed, so a booby-trapped extension page could run hidden code on your computer when you clicked a link. The attacker still needs you to open that page and click, and needs certain conditions in your editor to be in place.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.