GitHub Copilot and Visual Studio Code Elevation of Privilege Vulnerability (CVE-2026-70335)
GitHub Copilot and Visual Studio Code fail to neutralise special elements in OS commands, allowing an attacker to embed malicious instructions in content the AI agent processes. When a user runs the agent against that content, the injected instructions could cause the agent to run commands on the user's machine without confirmation, executing code as the signed-in user.
Originally disclosed on Microsoft
Description
Improper neutralization of special elements used in an os command ('os command injection') in GitHub Copilot and Visual Studio Code allows an unauthorized attacker to elevate privileges locally.
FAQ
How could an attacker exploit this vulnerability? An attacker could embed malicious instructions in content that the AI agent processes, such as a web page, a repository file, or a tool response. When a user runs the agent against that content, the injected instructions could cause the agent to run commands on the user's machine without prompting for confirmation. Successful exploitation could allow the attacker to execute code in the context of the signed-in user. User interaction is required and the attack is carried out locally; no authentication is required for the attacker to supply the content.
GitHub Copilot and Visual Studio Code
GitHub Copilot and 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 AI agent treats untrusted content as instructions and passes model-generated commands to an OS command execution path without neutralising special elements or requiring confirmation.
Impact
Successful exploitation could allow the attacker to execute code in the context of the signed-in user; user interaction is required and the attack is carried out locally.
What the attacker needed
Victim runs the AI agent on attacker content; user interaction required; no authentication needed to supply content
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.
An AI coding assistant reads text from web pages, repository files, or tool responses and may follow instructions hidden in that text. Here, the assistant could be tricked into running operating-system commands on the user's computer without asking first. This lets whoever planted the text run code with the user's own permissions.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.