GitHub Copilot for Jetbrains Remote Code Execution Vulnerability (CVE-2025-64671)
GitHub Copilot for JetBrains failed to neutralise special elements in commands, allowing command injection. An attacker could use a malicious cross-prompt injection in untrusted files or MCP servers to append extra commands to those already allowed by the user's terminal auto-approve setting, executing code locally.
Originally disclosed on Microsoft
Description
Improper neutralization of special elements used in a command ('command injection') in Copilot allows an unauthorized attacker to execute code locally.
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.
FAQ
How could an attacker exploit this vulnerability? Via a malicious Cross Prompt Inject in untrusted files or MCP servers, an attacker could execute additional commands by appending them to commands allowed in the user's terminal auto-approve setting.
Copilot
Copilot
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 plugin did not properly neutralise special characters when building terminal commands from AI-suggested content, so appended commands slipped past the auto-approve check.
Impact
An attacker could execute arbitrary code locally, but only if the user has terminal auto-approve configured and the malicious content reaches the assistant through untrusted files or MCP servers.
What the attacker needed
Copilot for JetBrains installed; terminal auto-approve enabled; malicious file or MCP server
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 plugin for JetBrains IDEs. The assistant can run terminal commands, and if the user has set certain commands to be auto-approved, a malicious instruction hidden in a file or an MCP server can sneak extra commands onto the end of an approved one. That lets the attacker run their own code on the user's machine, though they need to get the malicious content in front of the assistant first.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.