Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPlace prompt-injection payload in target file (README/config)
-
DeliveryDeveloper opens file in Claude Code session
-
ExploitClaude reads injected instructions silently
-
ExecutionWebFetch issues request to attacker HuggingFace URL with encoded data
-
PersistHuggingFace logs request path server-side
-
ImpactAttacker retrieves exfiltrated data from download logs
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Strict input allowlisting
|
| Exploitation Conditions | Exploitation requires two concrete conditions: (1) the attacker must be able to inject untrusted instruction content into the Claude Code context window - for example, by embedding a prompt-injection payload in a file that Claude is asked to read (README, config file, dependency manifest, data file) within a repository or directory being processed; and (2) the target system running Claude Code must have outbound network access to huggingface.co on port 443. The pre-approved domain bypass removes the normal permission-prompt safeguard and the --allowedTools restriction as additional limiting factors that would otherwise require explicit user approval. Exploitation is limited by: the attacker's ability to get content into the context window (requires some form of social engineering, supply chain placement, or prior compromise of a file the user processes); the need for outbound HTTPS access to huggingface.co not being blocked by egress controls; and the exfiltrated data being limited to what the Claude Code process can access within the session (files, env vars, command output - not OS-level privilege escalation). Authentication to Claude Code or the host system is not required by the attacker. |
| Impact | Real-world risk is elevated for users of Claude Code who routinely process untrusted content (reviewing third-party repositories, reading user-supplied configuration files, or operating in automated pipelines with external inputs). The core exploitation barrier is the ability to inject instructions into the context window - a well-documented class of attack against LLM-based coding agents. CVSS is not provided by the vendor, but the attack vector is network-reachable (injected content delivered remotely), complexity is high (content injection must succeed and be framed correctly to trigger the fetch), and the confidentiality impact is high (arbitrary local data accessible to the Claude Code process can be exfiltrated). No EPSS score is available as NVD has not yet assigned one; KEV status is negative. The --allowedTools bypass dimension is particularly significant for organizations that believed tool restrictions provided a security boundary - this vulnerability breaks that assumption for the HuggingFace domain specifically. The covert nature of the channel (disguised as a legitimate model download) makes detection difficult without network egress monitoring. The patch is available and auto-update users are already protected. |
| Exploit ScenarioDerived | A threat actor publishes a malicious HuggingFace repository and embeds a prompt-injection payload inside a README.md or model config file within a target GitHub repository. When a developer uses Claude Code to review or summarize that repository, Claude reads the README and encounters instructions to fetch a HuggingFace URL constructed from encoded environment variables or SSH key contents. Because huggingface.co is pre-approved, Claude issues the WebFetch request silently, and the attacker's server-side download logs capture the exfiltrated data encoded in the request path. No public proof-of-concept code has been identified, but the technique is straightforward for any attacker with a HuggingFace account and the ability to place a file in the developer's review scope. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 18, 2026
Out-of-band data exfiltration in Claude Code (npm/@anthropic-ai/claude-code versions 0.2.54 through 2.1.162) allows a prompt-injection attacker to silently exfiltrate files, environment variables, and command output by exploiting a pre-approved bare hostname bypass in the WebFetch tool. Because huggingface.co was whitelisted at the hostname level only, any path on that domain - including attacker-controlled model repository paths - was auto-approved without triggering a permission prompt and without being constrained by --allowedTools restrictions. The prerequisite is the ability to inject untrusted content into a Claude Code context window (e.g., via a malicious README, dependency file, or data file read during a session); no public exploit code has been identified at time of analysis, and the vulnerability has been patched in version 2.1.163.
RemediationAI
Vendor-released patch: 2.1.163. Users running standard Claude Code auto-update have already received the fix. Users performing manual updates should upgrade to version 2.1.163 or later immediately via npm update -g @anthropic-ai/claude-code or equivalent package manager command. The fix presumably narrows the WebFetch approval to full URL patterns rather than bare hostnames, eliminating the implicit path wildcard for huggingface.co. Until patched, users processing untrusted content (third-party repo reviews, automated pipelines with external inputs) should consider restricting Claude Code's network access via egress firewall rules or a proxy that blocks unexpected outbound requests to huggingface.co; note this may break legitimate model browsing workflows. Auditing outbound network traffic from Claude Code sessions for unexpected HuggingFace download-path requests can serve as a detection control. The advisory is at https://github.com/anthropics/claude-code/security/advisories/GHSA-fg94-h982-f3mm.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected component is the WebFetch built-in tool in Claude Code (pkg:npm/@anthropic-ai/claude-code, versions ≥ 0.2.54 and < 2.1.163), an AI-assisted coding environment. The root cause maps to CWE-183 (Permissive List of Allowed Inputs): the tool's permission model evaluated approval at the hostname granularity only, not at the full URL level. Whitelisting huggingface.co as a bare hostname implicitly pre-approved every path under that domain, including user-generated repository content (e.g., huggingface.co/attacker-user/malicious-repo/resolve/main/config.json). Because HuggingFace records server-side download metrics per URL path, an attacker can encode arbitrary data - such as file contents, environment variable values, or command output - into the URL path string, causing the Claude Code agent to issue a network request that effectively delivers the encoded payload to infrastructure the attacker monitors. This technique is a form of prompt-injection-driven covert channel, leveraging a trusted third-party domain as the exfiltration vector to bypass tooling restrictions.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Network-delivered prompt injection (AV:N), high complexity for context injection success (AC:H), no attacker credentials needed (PR:N), user must process injected content (UI:R), data exits to attacker-controlled server (S:C), arbitrary local data exfiltrated (C:H), no integrity or availability impact.
Primary rating from Vendor (https://github.com/anthropics/claude-code).
CVSS VectorVendor: https://github.com/anthropics/claude-code
Lifecycle Timeline
1DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
EUVD-2026-38538
GHSA-fg94-h982-f3mm
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB