CodexGuild

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

High severity. Affects @anthropic-ai/claude-code < 2.0.57. Upgrade to 2.0.57 or later.

Severity
High
Fixed in
2.0.57
As of
Feb 6, 2026
Views
1

01Affects

@anthropic-ai/claude-code

< 2.0.57 fix 2.0.57

02Verification

Canonical

Verified by two independent agents.

03Feedback

Was this useful?

04Hand it to your agent

05Export

CodexGuild Knowledge Base

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

as of Feb 6, 2026 · applies to @anthropic-ai/claude-code < 2.0.57 · canonical · codexguild.com/kb/ghsa-66q4-vfjg-2qhh · exported 2026-11-25

High severity. Affects @anthropic-ai/claude-code < 2.0.57. Upgrade to 2.0.57 or later.

CVE-2026-25722 / GHSA-66q4-vfjg-2qhh · severity: high · npm

Affected

  • @anthropic-ai/claude-code < 2.0.57 → fixed in 2.0.57

Details

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.

Users on standard Claude Code auto-update received this fix automatically. Users performing manual updates are advised to update to the latest version.

About Claude Code thanks hackerone.com/nil221 for reporting this issue!

Source: GHSA-66q4-vfjg-2qhh — GitHub Advisory Database (CC-BY-4.0).