CVE-2026-29783
GitHub Copilot CLI allows for dangerous shell expansion patterns that enable arbitrary command execution
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Active
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.5
GitHub Copilot CLI allows for dangerous shell expansion patterns that enable arbitrary command execution
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.
- Record
CVE-2026-29783- CVSS 4.0
- 7.5 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - Weakness
- CWE-78
- Updated
- 2026-11-03
EUVDEUVD-2026-10049
7.5
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.
- Record
EUVD-2026-10049- CVSS 4.0
- 7.5 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-g8r9-g2v8-jv6f
7.5
GitHub Copilot CLI Dangerous Shell Expansion Patterns Enable Arbitrary Code Execution
Summary
A security vulnerability has been identified in GitHub Copilot CLI's shell tool that could 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."
Details
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}— Prompt expansion: The@Pparameter transformation operator evaluates its value as a prompt string, which interprets embedded command substitutions. This allows hidden command execution inside what appears to be a simple variable reference. -
${var=value}/${var:=value}— Assignment side-effects: These forms assign values to variables as a side-effect of expansion. When chained with@P, an attacker can progressively build up a command substitution string across multiple expansions. -
${!var}— Indirect expansion: Dereferences an arbitrary variable name, which can be combined with other patterns to construct and execute commands dynamically. -
Nested
$(cmd)or<(cmd)inside${...}expansions: Command substitution or process substitution embedded within parameter expansion default values (e.g.,${HOME:-$(whoami)}) executes the nested command.
Proof of Concept
The following command appears to run a harmless echo, but actually executes touch /tmp/pwned through chained parameter expansion:
echo ${a="$"}${b="$a(touch /tmp/pwned)"}${b@P}
How it works:
${a="$"}assigns the literal$character to variablea${b="$a(touch /tmp/pwned)"}expands$ato$, constructing the string$(touch /tmp/pwned)and assigning it tob${b@P}applies prompt expansion tob, which evaluates the embedded$(touch /tmp/pwned)command substitution
Prior to the fix, the safety assessment would classify echo as a read-only command and allow execution without user confirmation — even in modes that normally require approval for write operations.
Impact
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.
Affected Versions
- GitHub Copilot CLI versions prior to 0.0.423
Remediation and Mitigation
Fix
The fix adds three layers of defense:
-
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. -
Unconditional blocking: Commands with dangerous expansion patterns are unconditionally blocked at the tool execution layer — regardless of permission mode (including
--yolo/ autopilot).…
- Record
GHSA-g8r9-g2v8-jv6f- CVSS 4.0
- 7.5 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - Weakness
- CWE-78
- Updated
- 2026-11-02
NVD
7.5
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.
- Record
CVE-2026-29783- CVSS 4.0
- 7.5 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 7.8 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-04
OSV
7.5
GitHub Copilot CLI allows for dangerous shell expansion patterns that enable arbitrary command execution
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.
- Record
CVE-2026-29783- CVSS 4.0
- 7.5 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - Weakness
- CWE-78
- Updated
- 2026-11-07
OSVGHSA-g8r9-g2v8-jv6f
7.5
GitHub Copilot CLI Dangerous Shell Expansion Patterns Enable Arbitrary Code Execution
Summary
A security vulnerability has been identified in GitHub Copilot CLI's shell tool that could 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."
Details
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}— Prompt expansion: The@Pparameter transformation operator evaluates its value as a prompt string, which interprets embedded command substitutions. This allows hidden command execution inside what appears to be a simple variable reference. -
${var=value}/${var:=value}— Assignment side-effects: These forms assign values to variables as a side-effect of expansion. When chained with@P, an attacker can progressively build up a command substitution string across multiple expansions. -
${!var}— Indirect expansion: Dereferences an arbitrary variable name, which can be combined with other patterns to construct and execute commands dynamically. -
Nested
$(cmd)or<(cmd)inside${...}expansions: Command substitution or process substitution embedded within parameter expansion default values (e.g.,${HOME:-$(whoami)}) executes the nested command.
Proof of Concept
The following command appears to run a harmless echo, but actually executes touch /tmp/pwned through chained parameter expansion:
echo ${a="$"}${b="$a(touch /tmp/pwned)"}${b@P}
How it works:
${a="$"}assigns the literal$character to variablea${b="$a(touch /tmp/pwned)"}expands$ato$, constructing the string$(touch /tmp/pwned)and assigning it tob${b@P}applies prompt expansion tob, which evaluates the embedded$(touch /tmp/pwned)command substitution
Prior to the fix, the safety assessment would classify echo as a read-only command and allow execution without user confirmation — even in modes that normally require approval for write operations.
Impact
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.
Affected Versions
- GitHub Copilot CLI versions prior to 0.0.423
Remediation and Mitigation
Fix
The fix adds three layers of defense:
-
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. -
Unconditional blocking: Commands with dangerous expansion patterns are unconditionally blocked at the tool execution layer — regardless of permission mode (including
--yolo/ autopilot).…
- Record
GHSA-g8r9-g2v8-jv6f- CVSS 4.0
- 7.5 High
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - Weakness
- CWE-78
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
@github/copilotnpm |
through 0.0.422 | 0.0.423 |
@github/copilotnpm |
before 0.0.423 | 0.0.423 |
History
| Recorded | Changed | Sources |
|---|---|---|
| facts | CVE List, EUVD | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-29783 is a high vulnerability (CVSS 7.5) in Github Copilot-cli, published March 6, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.47%, the 40th percentile. Fixed in @github/copilot 0.0.423.
References
github.com/github/copilot-cli/security/advisories/GHSA-g8r9-g2v8-jv6f
github.com/github/copilot-cli/releases/tag/v0.0.423
nvd.nist.gov/vuln/detail/CVE-2026-29783
github.com/advisories/GHSA-g8r9-g2v8-jv6f
github.com/CVEProject/cvelistV5/tree/main/cves/2026/29xxx/CVE-2026-29783.json
github.com/github/copilot-cli
Left out here: the rest of 2 source descriptions. The JSON record has them.