Junglewise Threat Intelligence

CVE-2025-64755: Anthropic claude-code sed command validation bypass

CVE-2025-64755 · Severity: medium · CVSS 4 · Published 2025-11-20

Technologies: Anthropic Claude Code, @anthropic-ai/claude-code (npm). Vendors: Anthropic, npm.

Executive brief

Claude Code is an AI-powered code execution and file manipulation tool. A flaw in its sed command parsing allowed attackers to bypass security restrictions meant to prevent unauthorized file writes, enabling them to modify arbitrary files on the system. This could lead to code injection, data manipulation, or system compromise.

Technical details

The vulnerability is an input validation bypass (CWE-78: OS Command Injection) in the sed command parsing logic of @anthropic-ai/claude-code. The tool implements read-only file protections to restrict write operations, but flawed sed command parsing allowed an attacker to craft a malicious sed command that bypassed these validation checks. The attack requires network access and passive user interaction (likely the user running a command provided by or influenced by an attacker). Successful exploitation allows an attacker to write to arbitrary files on the host system, potentially enabling code injection, data exfiltration, or further system compromise. The fix was released in version 2.0.31; users on auto-update received it automatically, and manual update is required for others.

Affected products

  • Anthropic claude-code before 2.0.31

Timeline

  • 2025-11-20: disclosed
  • 2025-11-20: patched: Fixed in version 2.0.31

References

Related threats