CVE-2026-25723: Claude Code Vulnerable to Command Injection via Piped sed Command Bypasses File Write Restrictions
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.
Users on standard Claude Code auto-update received this fix automatically. Users performing manual updates are advised to update to the latest version.
Claude Code thanks hackerone.com/nil221 for reporting this issue!
Other sources
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.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-25723?
CVE-2026-25723 is classified as a critical vulnerability due to its potential for command injection and bypassing file write restrictions.
How do I fix CVE-2026-25723?
To fix CVE-2026-25723, update your Claude Code to version 2.0.55 or later, which addresses the command injection issue.
What software is affected by CVE-2026-25723?
CVE-2026-25723 affects Claude Code versions prior to 2.0.55.
Can CVE-2026-25723 allow unauthorized access to sensitive files?
Yes, CVE-2026-25723 can allow attackers to write to sensitive files by exploiting command injection vulnerabilities.
How does CVE-2026-25723 exploit piped sed commands?
CVE-2026-25723 exploits piped sed commands by failing to validate execution properly, allowing malicious commands to bypass security controls.