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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
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
3DescriptionCVE.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.
AnalysisAI
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.
Technical ContextAI
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.
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.
Same weakness CWE-183 – Permissive List of Allowed Inputs
View allSame technique Code Injection
View allVendor StatusVendor
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-38538
GHSA-fg94-h982-f3mm