Microsoft Visual Studio Code: Security feature bypass via code injection
Summary
A code injection weakness (CWE-94) in Visual Studio Code allows a local attacker to bypass a security feature. According to the vendor's GitHub issue, the flaw is in the VS Code Agent Host, where local-command handling could be reached by messages not originating from the user. Exploitation requires local access and user interaction, and a successful bypass could run commands on a developer workstation.
Affected
- Visual Studio Code 1.0.0 to before 1.145.3 (CNA record)
- The vendor issue names the VS Code Agent Host in version 1.145.2 and earlier.
- Unknown: whether separate backports exist for Insiders, forks or remote/server builds.
Fixed in
- Visual Studio Code 1.145.3 or later (vendor advisory GHSA-w9fm-7vcm-cvq4, fix commit 0b7cb30)
- Unknown: whether older releases received backports.
Workaround
- Vendor-suggested: use the Copilot harness instead of the Local harness where available. The scope of this workaround could not be verified against the full advisory.
- Updating to 1.145.3 or later is the primary action.
Exploitation
- No exploitation in the wild found. CISA SSVC: exploitation none, automatable no.
- No public proof of concept found. The public vendor issue contains the fix commit, so the root cause may be discoverable through patch comparison.
- Severity conflict: the CNA scores 7.8 (High), VulDB scores 4.8 (Medium). NVD had not yet analysed the CVE at the time of research.
Our recommendation
- Update Visual Studio Code to 1.145.3 or later on all developer endpoints.
- Check whether agent features (Local harness) are enabled in managed environments and restrict them where not needed.
- Be cautious with agent output that processes content from untrusted repositories, issues or documents.
- Verify the installed version after the update.
Information from Microsoft (Patch Tuesday November 2026)
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- CVE.org record CVE-2026-120782 www.cve.org
- Microsoft Security Update Guide (referenced, not retrieved) msrc.microsoft.com
- GitHub issue microsoft/vscode 347427 github.com
- VS Code Agent Host documentation code.visualstudio.com
- VulDB entry 435259 vuldb.com
- Strix CVE record CVE-2026-120782 www.strix.ai
- Rapid7 Patch Tuesday November 2026 www.rapid7.com
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 11 Nov 2026, 03:33.
Original description (NVD)
Improper control of generation of code ('code injection') in Visual Studio Code allows an unauthorized attacker to bypass a security feature locally.
NVD references (1)
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
