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

GitHub Copilot and Visual Studio Remote Code Execution Vulnerability (CVE-2026-21256)

GitHub Copilot and Visual Studio fail to neutralise special elements in commands, allowing prompt injection to coerce the system into executing attacker-controlled instructions. This can escalate to remote code execution when the compromised prompt causes backend components or integrated tools to run unintended commands.

Nakkouch Tarek Follow

Originally disclosed on Microsoft

High 8.8 View original

Description

Improper neutralization of special elements used in a command ('command injection') in GitHub Copilot and Visual Studio allows an unauthorized attacker to execute code over a network.

FAQ

How could an attacker exploit this vulnerability? The AV:N rating indicates the vulnerability is exploitable over the network, meaning an attacker can deliver a malicious prompt remotely without prior access, while UI:R means a user must interact with Copilot for exploitation to occur. Due to prompt injection, the system is coerced into executing attacker-controlled instructions, which can escalate into remote code execution (RCE) when the compromised prompt causes backend components or integrated tools to run unintended commands.

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 Nakkouch Tarek. 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 product does not properly neutralise special elements in commands, so prompt injection can steer backend components or integrated tools into running unintended commands.

Impact

An attacker could deliver a malicious prompt remotely and, if a user interacts with Copilot, potentially achieve remote code execution through backend components or integrated tools.

What the attacker needed

User interacts with Copilot; attacker can deliver a prompt remotely

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 where a crafted message (a 'prompt') can trick the assistant into running commands the attacker chose. Because the assistant is connected to tools that can execute code, that trick can lead to the attacker running their own code on the system. The user has to interact with the assistant for this to happen.

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 Nakkouch Tarek

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.