Read the docs
TI-2026-20791 Aliases CVE-2026-25722GHSA-66q4-vfjg-2qhh

Claude Code Vulnerable to Command Injection via Directory Change Bypasses Write Protection

Priority LOW 36CWE-20Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Passive
Attack complexity
Low
Attack requirements
Present
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-78.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00509 43rd percentileScored 2026-11-07
Fix Fixed claude-code (anthropics): 2.0.57@anthropic-ai/claude-code (npm): 2.0.57

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
anthropicsclaude-codebefore 2.0.572.0.57Patch availableCNA
—@anthropic-ai/claude-code (npm)before 2.0.572.0.57Patch availableGHSA-66q4-vfjg-2qhh
  • claude-code Vendoranthropics Affected before 2.0.57 Fixed in 2.0.57 Patch available CNA
  • @anthropic-ai/claude-code (npm) Vendor— Affected before 2.0.57 Fixed in 2.0.57 Patch available GHSA-66q4-vfjg-2qhh

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:*before 2.0.57Vulnerableanthropics
  • cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:* Versions before 2.0.57 Vulnerable ·anthropics

Remediation

  • Fix · CNA claude-code (anthropics) Fixed in 2.0.57
  • Fix · GHSA-66q4-vfjg-2qhh @anthropic-ai/claude-code (npm) Fixed in 2.0.57 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-25722
  2. 2026-10-03 Alias added: GHSA-66q4-vfjg-2qhh
  3. 2026-10-04 EPSS moved to the 50th–90th percentile
  4. 2026-10-25 EPSS moved to the below the 50th percentile

References

  • TI-2025-40558 Claude Code Command Validation Bypass Allows Arbitrary Code Execution CVSS 4.0HIGH 8.7
  • TI-2025-36683 Claude Code vulnerable to arbitrary code execution caused by maliciously configured git email CVSS 4.0HIGH 8.7
  • TI-2025-37066 Claude Code's startup trust dialog could lead to Command Execution attack CVSS 4.0HIGH 8.7
  • TI-2026-17554 Claude Code Leaks Data via Malicious Environment Configuration Before Trust Confirmation CVSS 4.0MEDIUM 5.3
  • TI-2025-40093 @anthropic-ai/claude-code has Sed Command Validation Bypass that Allows Arbitrary File Writes CVSS 4.0HIGH 8.7
  • TI-2025-36422 Claude Code rg command had Command Injection that allowed bypass of user approval prompt for command execution CVSS 4.0HIGH 8.7
See all 25 →

Sources