CVE-2026-54316
Awaiting Analysis Awaiting Analysis - Queue
WebFetch Hostname Bypass in Claude Code

Publication date: 2026-06-23

Last updated on: 2026-06-23

Assigner: GitHub, Inc.

Description
Claude Code is an agentic coding tool. From 0.2.54 until 2.1.163, 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. This vulnerability is fixed in 2.1.163.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-23
Last Modified
2026-06-23
Generated
2026-06-24
AI Q&A
2026-06-23
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
anthropic-ai claude-code From 0.2.54 (inc) to 2.1.163 (exc)
anthropic-ai claude-code 2.1.163
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-515 A covert storage channel transfers information through the setting of bits by one program and the reading of those bits by another. What distinguishes this case from that of ordinary operation is that the bits are used to convey encoded information.
CWE-200 The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
CWE-183 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.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Compliance Impact

This vulnerability allows an attacker to exfiltrate sensitive data such as files, environment variables, or command output from the Claude Code environment through a covert out-of-band channel. Such unauthorized data exposure can lead to violations of data protection regulations like GDPR and HIPAA, which mandate strict controls over the confidentiality and integrity of personal and sensitive information.

Because the vulnerability enables exposure of sensitive information without user consent or proper access controls, it undermines compliance with standards requiring data confidentiality and secure handling of sensitive data.

Executive Summary

CVE-2026-54316 is a vulnerability in the Claude Code tool versions from 0.2.54 up to but not including 2.1.163. The issue arises because the hostname huggingface.co was pre-approved as a bare domain for the WebFetch tool, allowing any path on that domain—including attacker-controlled model repositories—to be accessed automatically without user permission or restrictions.

An attacker who can inject untrusted content into a Claude Code context can exploit this to make WebFetch requests to attacker-controlled files on HuggingFace. These requests are counted as downloads by HuggingFace, creating a covert out-of-band channel to exfiltrate sensitive data such as files, environment variables, or command output accessible to Claude Code.

Exploitation requires the attacker to be able to add untrusted content into the Claude Code context window. The vulnerability was fixed in version 2.1.163.

Impact Analysis

This vulnerability can lead to unauthorized data exfiltration from the Claude Code environment. An attacker able to inject untrusted content can cause Claude Code to fetch attacker-controlled files, which can be used to leak sensitive information such as files, environment variables, or command output.

Because the requests are counted as downloads by HuggingFace, this creates a covert channel that can bypass normal security controls, potentially exposing confidential information without detection.

The impact is primarily on confidentiality, with a moderate severity rating (CVSS score 6.0). Users who do not update to version 2.1.163 or later remain vulnerable.

Detection Guidance

Detection of this vulnerability involves identifying if a vulnerable version of Claude Code (>= 0.2.54 and < 2.1.163) is in use and monitoring for unusual WebFetch requests to the huggingface.co domain, especially requests to attacker-controlled paths such as /resolve/main/config.json.

Network monitoring tools can be used to detect outbound requests to huggingface.co that are unexpected or suspicious.

Suggested commands include using network traffic analysis tools like tcpdump or Wireshark to filter HTTP requests to huggingface.co, for example:

  • tcpdump -i any -A host huggingface.co and port 80
  • tcpdump -i any -A host huggingface.co and port 443

Additionally, inspecting logs or using command-line tools to check the installed version of Claude Code can help identify vulnerable installations:

  • npm list @anthropic-ai/claude-code
  • Check the version in package.json or lock files for versions between 0.2.54 and 2.1.163.
Mitigation Strategies

The primary mitigation step is to upgrade Claude Code to version 2.1.163 or later, where this vulnerability is fixed.

If auto-updates are enabled, the fix may already be applied; otherwise, manual update is necessary.

Additionally, restrict or monitor the injection of untrusted content into Claude Code contexts to prevent exploitation.

Review and tighten permissions and allowed tools settings to avoid unauthorized WebFetch requests.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-54316. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart