CoPilot Chat Security Feature Bypass Vulnerability (CVE-2026-65675)
The Visual Studio Code CoPilot Chat extension failed to properly restrict where its AI coding agent could write files. An attacker supplying specially crafted content could cause the agent to create or modify files outside the user's opened workspace folder.
Originally disclosed on Microsoft
Description
No cwe for this issue in Visual Studio Code CoPilot Chat Extension allows an unauthorized attacker to bypass a security feature over a network.
FAQ
How could an attacker exploit this vulnerability? An attacker could exploit this vulnerability by supplying specially crafted content that the AI coding agent processes, causing it to write files outside the workspace folder the user opened. Exploitation requires the user to be operating the agent in an automatic edit-approval mode. Successful exploitation could allow an attacker to create or modify files that the user did not intend the agent to change.
Visual Studio Code CoPilot Chat Extension
Visual Studio Code CoPilot Chat Extension
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 agent's file-writing actions were not confined to the opened workspace folder when running in automatic edit-approval mode.
Impact
An attacker could create or modify files the user did not intend the agent to change, but only if the user is running the agent in an automatic edit-approval mode.
What the attacker needed
Agent in automatic edit-approval mode; attacker-supplied crafted content
The fix
The vendor advises that customer action is required, but the text does not describe the actual remediation.
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 inside a code editor can read and change files on your computer. Normally it should only touch the project folder you opened. Here, content an attacker controls could trick the assistant into writing files elsewhere on the machine, which the user never intended.
What is AI / LLM?
Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.