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

CVE-2025-64755 · Severity: critical · CVSS 9.8 · Published 2025-11-21

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.

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

Quick answers

Is CVE-2025-64755 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2025-64755 being exploited in the wild.
How severe is CVE-2025-64755?
Critical severity, with a CVSS score of 9.8, published 21 November 2025.
Which products and versions are affected?
Anthropic Claude Code before 2.0.31; @anthropic-ai/claude-code (npm) SEMVER:introduced=0,fixed=2.0.31.
Is there a fix for CVE-2025-64755?
Yes. @anthropic-ai/claude-code (npm): upgrade to 2.0.31 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2025-64755 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2025-64755?
Check whether you run Anthropic Claude Code or @anthropic-ai/claude-code (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • @anthropic-ai/claude-code (npm): upgrade to 2.0.31 or later
    npm install @anthropic-ai/claude-code@2.0.31

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

Identifiers

  • CVE-2025-64755
  • GHSA-7mv8-j34q-vp7q

Timeline

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

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.