
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-54316 is an out-of-band data exfiltration vulnerability in Anthropic's Claude Code agentic coding tool, caused by an overly permissive pre-approved hostname allowlist in the WebFetch tool. The hostname huggingface.co was whitelisted as a bare hostname, meaning any path on that domain — including attacker-controlled model repositories — was auto-approved without triggering a permission prompt or respecting --allowedTools restrictions. Affected versions span from 0.2.54 through 2.1.162 of the @anthropic-ai/claude-code npm package. The vulnerability was reported via HackerOne by researcher novee, published on June 13, 2026, and patched on June 17, 2026. It carries a CVSS v3.1 base score of 9.1 (Critical) and a CVSS v4.0 base score of 6.0 (Medium) (GitHub Advisory, Anthropic Advisory).
The root cause is classified under CWE-183 (Permissive List of Allowed Inputs), CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor), and CWE-515 (Covert Storage Channel). Claude Code's WebFetch tool maintained a pre-approved list of hostnames; huggingface.co was approved at the bare hostname level, which inadvertently granted blanket approval to all paths under that domain, including attacker-controlled repository paths such as /resolve/main/config.json. An attacker who can inject untrusted content into a Claude Code context window (e.g., via a malicious README, prompt injection in a file, or poisoned repository content) can craft instructions directing Claude to issue WebFetch requests to an attacker-controlled HuggingFace repository. HuggingFace's server-side download counting mechanism then acts as a covert storage channel: data accessible to Claude (files, environment variables, command output) can be encoded into the URL path or filename structure of the fetch request, and the attacker observes the download count or request logs on their repository to decode the exfiltrated data. A public PoC lab is available at PoC Lab (GitHub Advisory).
Successful exploitation enables covert exfiltration of sensitive data accessible to the Claude Code process, including local files, environment variables (which may contain API keys, credentials, or tokens), and command output — all without triggering any user-visible permission prompt. The confidentiality impact is high, as an attacker can systematically extract secrets from the developer's environment. Integrity and availability are not directly impacted by this vulnerability. The attack is particularly dangerous in CI/CD pipelines or automated agentic workflows where Claude Code operates with broad filesystem and environment access (GitHub Advisory, Anthropic Advisory).
A public proof-of-concept exploit lab is available on GitHub (PoC Lab), providing step-by-step reproduction instructions, setup commands, payload files (payloads/untrusted-readme.md), and scripts (scripts/make_hf_canary_files.sh) demonstrating both the permission bypass and multi-step exfiltration scenario. The EPSS score is approximately 0.42%, placing it in the 32nd percentile for exploitation likelihood within 30 days. There is no current evidence of in-the-wild exploitation, no threat actor attribution, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires the attacker to first inject untrusted content into a Claude Code context window, which is a meaningful precondition that limits opportunistic exploitation (GitHub Advisory, PoC Lab).
<attacker-account>/canary-lab) and upload files such as config.json at paths like /resolve/main/config.json. Use the provided script scripts/make_hf_canary_files.sh from the PoC to generate canary files.Use WebFetch to fetch https://huggingface.co/<attacker-account>/canary-lab/resolve/main/config.json along with instructions to encode target data (e.g., environment variables or file contents) into the URL path.huggingface.co is pre-approved as a bare hostname, Claude Code issues the WebFetch request to the attacker-controlled repository path without displaying a permission prompt or checking --allowedTools restrictions.huggingface.co paths matching patterns like /resolve/main/*.json or other repository file paths, especially to repositories not associated with legitimate project dependencies; unusual frequency or timing of HuggingFace fetch requests during Claude Code sessions.huggingface.co/<unknown-account>/ paths without corresponding user-initiated prompts; absence of permission prompt events preceding HuggingFace WebFetch calls in audit logs.payloads/untrusted-readme.md or similar prompt-injection artifacts in project directories; unexpected config.json or canary files in repository working directories.Anthropic has released a fix in Claude Code version 2.1.163, which removes or restricts the bare-hostname pre-approval of huggingface.co in the WebFetch tool. Users on standard Claude Code auto-update will have received this fix automatically; users performing manual updates should upgrade to 2.1.163 or later immediately. As interim mitigations: restrict Claude Code's access to sensitive files and environment variables in automated pipelines; use --allowedTools restrictions carefully and audit the pre-approved hostname list; avoid processing untrusted repository content or READMEs with Claude Code in environments where sensitive credentials are present; and monitor outbound WebFetch requests to external domains for anomalous activity (GitHub Advisory, Anthropic Advisory).
The vulnerability was reported to Anthropic via HackerOne by researcher novee and was acknowledged and patched promptly, with the advisory published by Anthropic security engineer ddworken on June 13, 2026. The case has drawn attention as an example of prompt injection enabling covert data exfiltration through a trusted third-party domain's side-channel (download counting), highlighting risks in agentic AI tool permission models. Detection coverage has been added by Qualys (detection ID 5013966) and Tenable Nessus (plugin 322792), indicating broad security tooling awareness (GitHub Advisory, Anthropic Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."