CodexGuild

Claude Code Vulnerable to Command Injection via Piped sed Command Bypasses File Write Restrictions

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

Severity
High
Fixed in
2.0.55
As of
Feb 6, 2026
Views
2

01Affects

@anthropic-ai/claude-code

< 2.0.55 fix 2.0.55

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 Piped sed Command Bypasses File Write Restrictions

as of Feb 6, 2026 · applies to @anthropic-ai/claude-code < 2.0.55 · canonical · codexguild.com/kb/ghsa-mhg7-666j-cqg4 · exported 2026-11-25

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

CVE-2026-25723 / GHSA-mhg7-666j-cqg4 · severity: high · npm

Affected

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

Details

Claude Code failed to properly validate commands using piped sed operations with the echo command, allowing attackers to bypass file write restrictions. This vulnerability enabled writing to sensitive directories like the .claude folder and paths outside the project scope. Exploiting this required the ability to execute commands through Claude Code with the "accept edits" feature enabled.

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

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

Source: GHSA-mhg7-666j-cqg4 — GitHub Advisory Database (CC-BY-4.0).