Vulnerability · Published Feb 6, 2026 · Assigned by GitHub_M

CVE-2026-25722Claude Code Vulnerable to Command Injection via Directory Change Bypasses Write Protection

High 7.7

In plain English

A high-severity improper input validation in claude-code from anthropics. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 44% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)7.7High
Exploit odds (30 days)0.5%top 56.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 & fixed versions

EcosystemPackageFixed inAdvisory
npm@anthropic-ai/claude-code2.0.57GHSA-66q4-vfjg-2qhh

Affected products (as reported)

VendorProductVersions
anthropics claude-code < 2.0.57

Weakness: CWE-20, CWE-78 · 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

References