Anthropics claude-code
Claude Code Vulnerable to Command Injection via Directory Change Bypasses Write Protection
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.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS9.1critical · scored by NVD · CWE-20
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
anthropics claude-code
- < 2.0.57
Fixed in 2.0.57
Mitigation
Upgrade claude-code to 2.0.57 or later.
References
- Vendor advisory github.com/anthropics/claude-code/security/adv…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.