Claude Code Vulnerable to Command Injection via Piped sed Command Bypasses File Write Restrictions
CVE-2026-25723 · GHSA-mhg7-666j-cqg4 · published 2026-02-06
- Severity
- High
- CVSS score
- 7.7
- Chance of exploitation (EPSS)
- 0.39%
- Fixed in
- 2.0.55
- Exploitation No known exploitation
- Automatable No
- Technical impact Total
- CISA SSVC
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.
Upgrade @anthropic-ai/claude-code to 2.0.55 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.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| @anthropic-ai/claude-code | npm | < 2.0.55 | 2.0.55 |
- 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
- HighClaude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace@anthropic-ai/claude-code
- HighClaude Code: Plugin Hash Pin Bypass Allows Bypass of Hash Pinning@anthropic-ai/claude-code
- HighClaude Code: Sandbox Escape via Git Worktree Path Confusion Allows Unsandboxed Code Execution@anthropic-ai/claude-code
- HighClaude Code: Trust Dialog Bypass via Git Worktree Spoofing Allows Arbitrary Code Execution@anthropic-ai/claude-code
- HighClaude Code: Sandbox Escape via Symlink Following Allows Arbitrary File Write Outside Workspace@anthropic-ai/claude-code
- HighClaude Code has a Workspace Trust Dialog Bypass via Repo-Controlled Settings File@anthropic-ai/claude-code
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.