CVE-2026-54316: Claude Code Out-of-Band Data Exfiltration Vulnerability

MODERATE
Advisory Identifier: GHSA-fg94-h982-f3mm
CVSS 9.1
CWE-183 CWE-515 CWE-200
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-54316
GHSA Identifier GHSA-fg94-h982-f3mm
Severity MODERATE
CVSS v3.1 Base Score 9.1
CWE Classification CWE-183: Permissive List of Allowed Inputs
Affected Product Claude Code
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (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.

@anthropic-ai/claude-code fixed: 2.1.163
npm install @anthropic-ai/claude-code@2.1.163
Verify Direct and Transitive Dependencies

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

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. Thank you to hackerone.com/novee for reporting this issue.

CVE-2026-54316 Affected Claude Code Versions

1 component(s)
Fixed Versions:
2.1.163
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?
CVE-2026-54316 is a security vulnerability in Claude Code involving Out-of-Band Data Exfiltration via Pre-Approved HuggingFace Domain in WebFetch under CWE-183: Permissive List of Allowed Inputs.
Which Claude Code versions are affected?
Affected versions include releases prior to 2.1.163 across affected packages: @anthropic-ai/claude-code.
What version fixes CVE-2026-54316?
Upgrading to 2.1.163 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @anthropic-ai/claude-code affected?
Yes, @anthropic-ai/claude-code is affected in releases prior to 2.1.163. Upgrade your dependency to 2.1.163 or later.
What is the CVSS score of CVE-2026-54316?
CVE-2026-54316 has a CVSS v3.1 base score of 9.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-54316?
CVE-2026-54316 is classified under CWE-183: Permissive List of Allowed Inputs (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.).
How can I check npm dependencies for CVE-2026-54316?
Run the dependency tree command: 'npm ls @anthropic-ai/claude-code'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}