HarborGuard / CVE
Back to search
HIGHCVE-2026-25722Published Modified CNA GitHub_M

CVE-2026-25722: 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.

Metrics

CVSS v4.0
7.7
Severity
HIGH
Fixed in
Affected Products
1
Affected packages
  • anthropics / claude-code
    < 2.0.57
CVSS Vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N