What’s Vulnerable › Vulnerabilities
CVE-2026-25722: Claude Code Vulnerable to Command Injection via Directory Change Bypasses Write Protection
- Severity: critical (CVSS 9.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.5% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-02-06 · updated 2026-06-17
- Weakness: CWE-20
Description
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.
Affected products
- anthropics claude-code: before 2.0.57 — fixed in 2.0.57
How to fix
Upgrade to a fixed version: anthropics claude-code 2.0.57. Check the vendor advisory for mitigations.
References
Get alerted when CVE-2026-25722 or the next vulnerability affects your stack