CVE-2026-54316: Claude Code Out-of-Band Data Exfiltration Vulnerability
MODERATECVE-2026-54316 is a MODERATE (CVSS 9.1) out-of-band data exfiltration vulnerability (CWE-183: Permissive List of Allowed Inputs) affecting Claude Code libraries in the npm ecosystem. The issue involves out-of-band data exfiltration via pre-approved huggingface domain in webfetch. Remediation is available by upgrading affected packages to version 2.1.163.
CVE-2026-54316 at a Glance
Security Impact
CVSS: 9.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-54316
To remediate this vulnerability, upgrade all affected 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.1.163
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-2026-54316, inspect your project dependencies using npm:
npm ls @anthropic-ai/claude-code
Analyze the terminal output to locate any version of 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.1.163), 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-183: Permissive List of Allowed Inputs, where the product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are explicitly allowed by policy because the inputs are assumed to be safe, but the list is too permissive - that is, it allows an input that is unsafe, leading to resultant weaknesses. In 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-2026-54316 Affected Claude Code Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@anthropic-ai/claude-code
|
npm |
≥ 0.2.54
< 2.1.163
|
2.1.163
|
References
Frequently Asked Questions
What is CVE-2026-54316?
Which Claude Code versions are affected?
What version fixes CVE-2026-54316?
Is @anthropic-ai/claude-code affected?
What is the CVSS score of CVE-2026-54316?
What CWE is associated with CVE-2026-54316?
How can I check npm dependencies for CVE-2026-54316?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fg94-h982-f3mm",
"modified" : "2026-07-20T21:10:30Z",
"published" : "2026-06-17T18:06:06Z",
"aliases" : [ "CVE-2026-54316" ],
"summary" : "Claude Code: Out-of-Band Data Exfiltration via Pre-Approved HuggingFace Domain in WebFetch",
"details" : "Because the hostname huggingface.co was pre-approved as a bare hostname for the WebFetch tool, any path on that domain—including attacker-controlled model repositories—was auto-approved without a permission prompt or being subject to --allowedTools restrictions. An attacker able to inject untrusted content into a Claude Code context could direct it to issue WebFetch requests against attacker-controlled repository files (e.g. /resolve/main/config.json), which HuggingFace counts as downloads server-side, creating a covert out-of-band channel for encoding and exfiltrating data Claude can access such as files, environment variables, or command output. Reliably exploiting this required the ability to add untrusted content into a Claude Code context window. Users on standard Claude Code auto-update have received this fix already; users performing manual updates are advised to update to the latest version.\n\nThank you to hackerone.com/novee for reporting this issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@anthropic-ai/claude-code"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.2.54"
}, {
"fixed" : "2.1.163"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/anthropics/claude-code/security/advisories/GHSA-fg94-h982-f3mm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-54316"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/anthropics/claude-code"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-183", "CWE-200", "CWE-515" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-17T18:06:06Z",
"nvd_published_at" : "2026-06-23T18:18:08Z"
}
}