Skip to content
RCE Advisory Advanced CVE-2025-62214

Visual Studio Remote Code Execution Vulnerability (CVE-2025-62214)

Visual Studio does not properly neutralise special elements used in a command, allowing an authorised attacker to execute code locally. Exploitation requires several steps: prompt injection, interaction with Copilot Agent, and triggering a build.

Nakkouch Tarek Follow

Originally disclosed on Microsoft

Critical 6.7 View original

Description

Improper neutralization of special elements used in a command ('command injection') in Visual Studio allows an authorized attacker to execute code locally.

FAQ

According to the CVSS metric, the attack complexity is high (AC:H). What does this mean for this vulnerability? Exploitation is not trivial for this vulnerability as it requires multiple steps: prompt injection, Copilot Agent interaction, and triggering a build.

FAQ

According to the CVSS metric, the attack vector is local (AV:L). Why does the CVE title indicate that this is a remote code execution? The word Remote in the title refers to the location of the attacker. This type of exploit is sometimes referred to as Arbitrary Code Execution (ACE). The attack itself is carried out locally. This means an attacker or victim needs to execute code from the local machine to exploit the vulnerability.

Visual Studio

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 Copilot Agent passes model-generated or prompt-influenced content into a command or build step without neutralising special elements, so injected instructions become executable commands.

Impact

An authorised attacker could execute code locally on the machine running Visual Studio, though exploitation is not trivial because it needs several chained steps.

What the attacker needed

Authorised access to Visual Studio; Copilot Agent available; victim triggers a build

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.

Command injection is when a program builds a system command out of input without cleaning it, so an attacker can slip in extra instructions. Here the input comes through an AI assistant (Copilot Agent) inside Visual Studio, and the attacker needs to trick it with a crafted prompt before a build is triggered. The result is that code runs on the developer's own machine.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

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.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.