CVE-2026-29783 GitHub Copilot CLI allows for dangerous shell expansion patterns that enable arbitrary command execution

High 7.5 Published Updated

Attackers can execute arbitrary commands via bash expansion patterns in GitHub Copilot CLI, bypassing safety checks and compromising user workstations.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-29783?

CVE-2026-29783 is a high-severity command injection vulnerability in github copilot-cli, published on 6 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

The shell tool within GitHub Copilot CLI versions prior to and including 0.0.422 can allow arbitrary code execution through crafted bash parameter expansion patterns. An attacker who can influence the commands executed by the agent (e.g., via prompt injection through repository files, MCP server responses, or user instructions) can exploit bash parameter transformation operators to execute hidden commands, bypassing the safety assessment that classifies commands as "read-only." This has been patched in version 0.0.423.

The vulnerability stems from how the CLI's shell safety assessment evaluates commands before execution. The safety layer parses and classifies shell commands as either read-only (safe) or write-capable (requires user approval). However, several bash parameter expansion features can embed executable code within arguments to otherwise read-only commands, causing them to appear safe while actually performing arbitrary operations.

The specific dangerous patterns are ${var@P}, ${var=value} / ${var:=value}, ${!var}, and nested $(cmd) or <(cmd) inside ${...} expansions. 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, or 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 use only read-only utilities to ultimately trigger write operations. Successful exploitation could lead to data exfiltration, file modification, or further system compromise.

Weakness: CWE-78

Which versions are affected by CVE-2026-29783?

2 open source packages ship an affected version, including @github/copilot. It affects 1 product.

PackageAffectedFixed in
@github/copilot npmAll versions0.0.423
@github/copilot npmAll versions0.0.423

Products include Github Copilot Command Line Interface.

How do I fix CVE-2026-29783?

Upgrade @github/copilot to 0.0.423 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2026-29783 being exploited?

There is no known exploitation of CVE-2026-29783 in the wild and no public exploit code.

Sources

Also known as GHSA-g8r9-g2v8-jv6f.

Is CVE-2026-29783 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free