Skip to content
AI / LLM Advisory Advanced CVE-2026-65675

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.

Rayhan Destian Follow

Originally disclosed on Microsoft

High 7.1 View original

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

The original report as published on the Microsoft Security Response Center, by Rayhan Destian. Images and videos are our own copies; raw HTML is shown as text. View it on Microsoft Security Response Center.

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.

More by Rayhan Destian

View all

2 more disclosed reports, best first.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

AI and LLM vulnerabilities

The lesson behind this report.

Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.