CVE-2025-64755: @anthropic ai/claude code @anthropic-ai/claude-code Has Sed Command Validation Vulnerability
HIGHCVE-2025-64755 is a HIGH @anthropic-ai/claude-code has sed command validation vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting @anthropic ai/claude code libraries in the npm ecosystem. The issue involves @anthropic-ai/claude-code has sed command validation bypass that allows arbitrary file writes. Remediation is available by upgrading affected packages to version 2.0.31.
CVE-2025-64755 at a Glance
How to Fix CVE-2025-64755
To remediate this vulnerability, upgrade all affected @anthropic ai/claude code dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @anthropic-ai/claude-code@2.0.31
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @anthropic-ai/claude-code
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-64755, inspect your project dependencies using npm:
npm ls @anthropic-ai/claude-code
Analyze the terminal output to locate any version of @anthropic ai/claude code in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.31), your application is affected.
Note: The npm ls @anthropic-ai/claude-code command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In @anthropic ai/claude code, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-64755 Affected @anthropic ai/claude code Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@anthropic-ai/claude-code
|
npm |
< 2.0.31
|
2.0.31
|
References
Frequently Asked Questions
What is CVE-2025-64755?
Which @anthropic ai/claude code versions are affected?
What version fixes CVE-2025-64755?
Is @anthropic-ai/claude-code affected?
What CWE is associated with CVE-2025-64755?
How can I check npm dependencies for CVE-2025-64755?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7mv8-j34q-vp7q",
"modified" : "2025-11-21T15:32:13Z",
"published" : "2025-11-20T21:28:08Z",
"aliases" : [ "CVE-2025-64755" ],
"summary" : "@anthropic-ai/claude-code has Sed Command Validation Bypass that Allows Arbitrary File Writes",
"details" : "Due to an error in sed command parsing, it was possible to bypass the Claude Code read-only validation and write to arbitrary files on the host system. \n\nUsers on standard Claude Code auto-update will have received this fix automatically. Users performing manual updates are advised to update to the latest version.\n\nThank you to Adam Chester - SpecterOps for reporting this issue!",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@anthropic-ai/claude-code"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0.31"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/anthropics/claude-code/security/advisories/GHSA-7mv8-j34q-vp7q"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-64755"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/anthropics/claude-code"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-11-20T21:28:08Z",
"nvd_published_at" : "2025-11-21T02:15:43Z"
}
}