Skip to main content
← All vulnerabilities
CVE-2026-25723GHSA-MHG7-666J-CQG4

Claude Code Vulnerable to Command Injection via Piped sed Command Bypasses File Write Restrictions

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 2.0.55
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: total

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: total

  3. Record last updated

Affected versions

  • anthropics claude-code

    fixed in 2.0.55

  • @anthropic-ai/claude-codenpm

    fixed in 2.0.55

References 1

GitHub · anthropics/claude-code