CVE-2026-25723
HIGH 7.7CVSS 4.0Claude Code Vulnerable to Command Injection via Piped sed Command Bypasses File Write Restrictions
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.
- Published
- 6 Feb 2026
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-20CWE-78
- Also known as
- GHSA-mhg7-666j-cqg4
- Sources
- NVDJSONOSV GHSA-mhg7-666j-cqg4JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | HIGH 7.7 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/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 |
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | anthropic | claude_codecpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:* |
< 2.0.55 | 2.0.55 |
| OSV | npm | @anthropic-ai/claude-code | < 2.0.55 | 2.0.55 |
References
- https://github.com/anthropics/claude-code/security/advisories/GHSA-mhg7-666j-cqg4 · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-25723 · ADVISORY
- https://github.com/anthropics/claude-code · PACKAGE
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 6 Feb 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 6 Feb 2026)