Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious workspace or file
-
DeliveryDeliver via repository, email, or link
-
ExploitVictim opens content in VS Code
-
ExecutionCode injection payload evaluated by VS Code runtime
-
PersistArbitrary code executes as victim user
-
ImpactFull access to developer workstation and credentials
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the victim is running a vulnerable version of Visual Studio Code and that they perform a user interaction - specifically opening or processing attacker-controlled content such as a workspace file, project folder, or crafted document. The CVSS PR:N metric confirms no authentication or account privileges are required on the attacker's side. The UI:R metric confirms that passive, zero-click exploitation is not possible; the victim must actively engage with the malicious content. Exploitation is not restricted to a specific operating system platform based on available data. The attack is limited by: (1) the requirement for victim interaction, making mass exploitation dependent on a social engineering or supply-chain delivery mechanism; (2) the scope being unchanged (S:U), meaning post-exploitation impact is bounded to the VS Code process and the user's session rather than a hypervisor or adjacent system. No specific non-default configuration or feature flag is identified as a prerequisite in the available data. |
| Impact | The CVSS score of 8.8 reflects a genuinely severe vulnerability: network-reachable, low attack complexity, no privileges required, and complete triad impact (C:H/I:H/A:H). The sole friction is UI:R - the victim must perform some interaction, such as opening a specially crafted file or workspace. In developer environments, where opening unfamiliar repositories or shared workspace configurations is routine, this friction is minimal in practice. No EPSS score was provided in the source data, and the absence of a KEV listing means active exploitation is not yet confirmed by CISA; however, the low complexity and wide attack surface of VS Code mean that exploitation tooling, once developed, would require little sophistication. Even a mid-sized municipal IT team in sopot running developer workstations on VS Code should treat this as an urgent patch priority given that developers regularly clone and open external repositories. The combination of a network attack vector, no required privileges, and high post-exploitation impact places this firmly in the 'patch immediately' tier despite the lack of confirmed in-the-wild exploitation. |
| Exploit ScenarioDerived | An attacker crafts a malicious VS Code workspace or file designed to inject code through the vulnerable code-generation path and hosts it on a public repository or sends it via email or chat. A developer opens the workspace in VS Code - a routine action during code review or project onboarding - triggering the injection and executing attacker-controlled code with the privileges of the VS Code process on the developer's workstation. No public proof-of-concept exploit was identified at the time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 11, 2026
Remote code execution in Microsoft Visual Studio Code allows a network-based attacker to inject and execute arbitrary code on a victim's machine with no prior authentication, provided the victim performs a user interaction - such as opening a malicious workspace, file, or URI. Classified under CWE-94 (Code Injection), the vulnerability carries a CVSS base score of 8.8, reflecting high impact across confidentiality, integrity, and availability. No public exploit code or CISA KEV listing was identified at the time of analysis, but the attack complexity is rated Low, making reliable exploitation straightforward once a victim is lured.
RemediationAI
The primary remediation is to apply the Microsoft-released patch referenced in the MSRC advisory at https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-70336. Users should update Visual Studio Code to the patched version specified in that advisory; an exact fix version number was not available in the data provided and must be confirmed from the MSRC page. As a compensating control pending patching, organizations should enable and enforce VS Code's Workspace Trust feature, which prompts users before executing workspace-level code, and configure it to default to Restricted mode for all unknown workspaces - this directly limits the code injection surface but does not eliminate it. Additionally, blocking VS Code's access to arbitrary external URIs and remote workspaces via network policy reduces the network-reachable attack surface. Developers should be advised not to open repositories or workspace files from untrusted or unverified sources until patched.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CWE-94 (Improper Control of Generation of Code - Code Injection) describes a class of vulnerabilities where user-controlled input is passed to a code generation or evaluation mechanism without adequate sanitization, allowing an attacker to inject executable logic. Visual Studio Code is Microsoft's Electron-based cross-platform IDE, which hosts a Node.js runtime, a built-in extension engine, and numerous embedded interpreters and language servers. Attack surface candidates for code injection in VS Code historically include workspace trust bypass, malicious .code-workspace files, settings injection, or extensions that evaluate untrusted input. The CVSS vector (AV:N/AC:L/PR:N/UI:R) indicates the injection path is reachable over the network with low complexity but requires the victim to take an action, consistent with opening a crafted file, repository, or remote workspace. The NVD CPE for affected versions was not provided in the available data; version ranges should be confirmed against the Microsoft MSRC advisory at https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-70336.
Know when Visual Studio Code gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Network-reachable injection requiring victim to open malicious content (UI:R, PR:N); full triad impact limited to user session scope (S:U).
Primary rating from Vendor (microsoft).
CVSS VectorNVD
Lifecycle Timeline
2DescriptionNVD
Improper control of generation of code ('code injection') in Visual Studio Code allows an unauthorized attacker to execute code over a network.
Executive ViewAI
Microsoft Visual Studio Code (CVE-2026-70336, CVSS 8.8) contains a remote code execution vulnerability allowing unauthenticated attackers to execute arbitrary code through malicious workspaces, files, or URIs when developers open untrusted projects. This directly threatens the security of development environments, source code repositories, and build systems across the organization. Immediate action is required to prevent developer machine compromise and protect the integrity of the software supply chain.
No vendor-released patch identified at time of analysis. Interim mitigations: enforce organizational policies restricting workspace trust to internal and verified sources only; disable or restrict remote workspace and untrusted extension installation capabilities; implement workspace and extension configuration code signing verification; deploy network segmentation to limit outbound connections from development machines; configure EDR to alert on suspicious child processes spawned by Visual Studio Code; and conduct mandatory security awareness training for development teams focused on phishing and malicious project risks.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
More in Visual Studio Code
View allVisual Studio Code Remote Code Execution Vulnerability. Rated high severity (CVSS 7.8), this vulnerability is no authent
Visual Studio Code Remote Code Execution Vulnerability. Rated high severity (CVSS 8.8), this vulnerability is remotely e
Security-feature bypass in Microsoft Visual Studio Code before 1.136.2 lets a remote, unauthenticated attacker defeat a
Remote code execution in Visual Studio Code (versions 1.0.0 up to but not including 1.141.1) is achievable through a pat
Privilege escalation in Microsoft Visual Studio Code allows remote unauthenticated attackers to elevate privileges over
Visual Studio Code Remote Code Execution Vulnerability. Rated high severity (CVSS 7.8), this vulnerability is no authent
Security feature bypass in Visual Studio Code before 1.145.3 allows an unauthenticated remote attacker to evade a securi
Cross-site scripting in Visual Studio Code before 1.145.3 can let unauthenticated, network-reachable attackers run attac
Security-feature bypass in Microsoft Visual Studio Code lets a remote attacker deliver functionality from an untrusted c
Remote code execution in Visual Studio Code (versions 1.0.0 through 1.132.0) is enabled by a missing authorization check
Command injection in Visual Studio Code 1.0.0 through 1.141.0 allows an unauthenticated remote attacker to execute arbit
Remote code execution in Visual Studio Code versions 1.0.0 through 1.141.1 allows an unauthenticated, network-positioned
EUVD-2026-56589
GHSA-29cx-mh6p-wj36
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB