Claude Code Command Injection Vulnerability Bypasses File Write Restrictions

Vulnerability

A command injection vulnerability has been identified in Claude Code versions prior to 2.0.55. The issue arises from improper validation of commands that use piped sed operations with the echo command. This flaw allows attackers to bypass file write restrictions and write to sensitive directories, such as the .claude folder, as well as paths outside the project scope. Exploitation of this vulnerability requires the 'accept edits' feature to be enabled.

Impact

Exploitation of this vulnerability allows for unauthorized command execution, leading to potential manipulation of files in sensitive directories and beyond the project's designated paths.

Remediation

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

Added: Feb 6, 2026, 6:27 PM
Updated: Feb 6, 2026, 11:58 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
5.2
remediation
0.0
relevance
2.8
threat
0.0
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.