High severityNVD Advisory· Published Feb 6, 2026· Updated Feb 6, 2026
Claude Code Vulnerable to Command Injection via Directory Change Bypasses Write Protection
CVE-2026-25722
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 packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
@anthropic-ai/claude-codenpm | < 2.0.57 | 2.0.57 |
Affected products
1- Range: < 2.0.57
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
3- github.com/advisories/GHSA-66q4-vfjg-2qhhghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-25722ghsaADVISORY
- github.com/anthropics/claude-code/security/advisories/GHSA-66q4-vfjg-2qhhghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.