Claude Code Vulnerable to Command Injection via Piped sed Command Bypasses File Write Restrictions
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| anthropics | claude-code | affected |
|
No data.
| Vendor | Product | Versions |
|---|---|---|
| Anthropics | Claude Code | — |
| Source | ID | Title |
|---|---|---|
Github GHSA |
GHSA-mhg7-666j-cqg4 | Claude Code Vulnerable to Command Injection via Piped sed Command Bypasses File Write Restrictions |
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.385% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Anthropic
Anthropic claude Code |
|
| CPEs | cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:* | |
| Vendors & Products |
Anthropic
Anthropic claude Code |
|
| Metrics |
cvssV3_1
|
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Anthropics
Anthropics claude Code |
|
| Vendors & Products |
Anthropics
Anthropics claude Code |
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| Description | Claude Code is an agentic coding tool. Prior to version 2.0.55, Claude Code failed to properly validate commands using piped sed operations with the echo command, allowing attackers to bypass file write restrictions. This vulnerability enabled writing to sensitive directories like the .claude folder and paths outside the project scope. Exploiting this required the ability to execute commands through Claude Code with the "accept edits" feature enabled. This issue has been patched in version 2.0.55. | |
| Title | Claude Code Vulnerable to Command Injection via Piped sed Command Bypasses File Write Restrictions | |
| Weaknesses | CWE-20 CWE-78 |
|
| References |
| |
| Metrics |
cvssV4_0
|