Skip to content
AI / LLM Advisory Intermediate CVE-2026-41109

GitHub Copilot and Visual Studio Code Security Feature Bypass Vulnerability (CVE-2026-41109)

GitHub Copilot and Visual Studio failed to neutralise special elements in output used by a downstream component, allowing an attacker to bypass a security feature. By embedding malicious instructions in user input or external content, an attacker could cause the tool to treat those instructions as trusted and perform unintended actions such as retrieving sensitive data or changing protected files without approval.

Alexander Tan Follow

Originally disclosed on Microsoft

High 8.8 View original

Description

Improper neutralization of special elements in output used by a downstream component ('injection') in GitHub Copilot and Visual Studio allows an unauthorized attacker to bypass a security feature over a network.

FAQ

According to the CVSS metric, user interaction is required (UI:R). What interaction would the user have to do? Exploitation of this vulnerability requires that an attacker convinces a user to open a maliciously crafted package file in Visual Studio.

FAQ

How could an attacker exploit this vulnerability? An attacker could exploit this vulnerability by embedding malicious instructions in user input or external content that is processed, causing it to bypass guardrails, treat those instructions as trusted, and execute unintended actions such as retrieving sensitive data.

FAQ

What kind of security feature could be bypassed by successfully exploiting this vulnerability? Successful exploitation could bypass the path validation safeguards that check which files may be changed and require user approval for sensitive locations, allowing changes to protected files without the user’s knowledge or consent.

GitHub Copilot and Visual Studio

GitHub Copilot and Visual Studio

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by Alexander Tan. 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 improper neutralisation of special elements in output used by a downstream component, so untrusted instructions are treated as trusted.

Impact

Exploitation could bypass path validation safeguards and allow changes to protected files without the user's knowledge or consent, and could retrieve sensitive data.

What the attacker needed

Victim opens a crafted package file; user interaction required

How it was found

  1. The attacker creates a maliciously crafted package file.
  2. The attacker convinces a user to open that package file in Visual Studio.
  3. The embedded instructions are processed and bypass the guardrails.

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.

This is a flaw in an AI coding assistant and the editor it runs in. The assistant is meant to follow safety rules, such as asking before changing important files. A crafted file or piece of text can trick it into ignoring those rules and acting as if the attacker's instructions were the user's own.

What is AI / LLM?

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

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.