GitHub Copilot CLI Dangerous Shell Expansion Patterns Enable Arbitrary Code Execution
CVE-2026-29783 · GHSA-g8r9-g2v8-jv6f · published 2026-03-06 · updated 2026-03-13
- Severity
- High
- CVSS score
- 7.5
- Chance of exploitation (EPSS)
- 0.47%
- Fixed in
- 0.0.423
- Exploitation No known exploitation
- Automatable No
- Technical impact Total
- CISA SSVC
An attacker who can influence command text sent to the shell tool — for example, through: Prompt injection via malicious repository content (README files, code comments, issue bodies) Compromised or malicious MCP server responses Crafted user instructions containing obfuscated commands — could achieve arbitrary code execution on the user's workstation. This is possible even in permission modes that require user approval for write operations, since the commands can appear to be using only read-only utilities to ultimately trigger write operations. Successful exploitation could lead to data exfiltration, file modification, or further system compromise.
Upgrade @github/copilot to 0.0.423 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
The fix adds three layers of defense: 1. Parse-time detection: The shell safety assessment analyzes ${...} expansion nodes within bash commands, detecting dangerous operators (@P, =, :=, !) and nested command/process substitutions. Commands containing these patterns are downgraded from read-only to write-capable, ensuring they require user approval. 2. Unconditional blocking: Commands with dangerous expansion patterns are unconditionally blocked at the tool execution layer — regardless of permission mode (including --yolo / autopilot). This prevents exploitation even when all commands are auto-approved. 3.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| @github/copilot | npm | <= 0.0.422 | 0.0.423 |
- CriticalUnauthenticated Remote Code Execution in Langflow via Public Flow Build EndpointlangflowExploited
- CriticalRay is vulnerable to Critical RCE via Safari & Firefox Browsers through DNS Rebinding AttackrayExploited
- CriticalLangflow Unauth RCElangflow, langflow-baseExploited
- HighLiteLLM: Authenticated command execution via MCP stdio test endpointslitellmExploited
- CriticalMLflow vulnerable to remote code execution on unauthenticated servers via third-party scorer deserialization importing caller-placed artifacmlflow
- CriticalAgno: Arbitrary code execution via `eval()` on `field_type` in `FunctionCall`agno
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.