Skip to main content
← All vulnerabilities
CVE-2026-25722GHSA-66Q4-VFJG-2QHH

Claude Code Vulnerable to Command Injection via Directory Change Bypasses Write Protection

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 2.0.57
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.57, Claude Code failed to properly validate directory changes when combined with write operations to protected folders. By using the cd command to navigate into sensitive directories like .claude, it was possible to bypass write protection and create or modify files without user confirmation. Reliably exploiting this required the ability to add untrusted content into a Claude Code context window. This issue has been patched in version 2.0.57.

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.57

  • @anthropic-ai/claude-codenpm

    fixed in 2.0.57

References 1

GitHub · anthropics/claude-code