Skip to main content

Claude Code CVE-2026-54316

| EUVDEUVD-2026-38538 MEDIUM
Permissive List of Allowed Inputs (CWE-183)
2026-06-17 https://github.com/anthropics/claude-code GHSA-fg94-h982-f3mm
6.0
CVSS 4.0 · Vendor: https://github.com/anthropics/claude-code
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Place prompt-injection payload in target file (README/config)
  2. Delivery
    Developer opens file in Claude Code session
  3. Exploit
    Claude reads injected instructions silently
  4. Execution
    WebFetch issues request to attacker HuggingFace URL with encoded data
  5. Persist
    HuggingFace logs request path server-side
  6. Impact
    Attacker 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

claude-code 0.2.54, < 2.1.163

Affected Packages

npm @anthropic-ai/claude-code fix: 2.1.163
euvd claude_code_0_2_54 fix: 2.1.163

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

Vendor (https://github.com/anthropics/claude-code) PRIMARY 6.0 MEDIUM
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
vuln.today AI 6.1 MEDIUM

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.

3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:A/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
Red Hat 5.3 MEDIUM

Primary rating from Vendor (https://github.com/anthropics/claude-code).

CVSS VectorVendor: https://github.com/anthropics/claude-code

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
CVSS changed
Jun 23, 2026 - 18:22 NVD
6.0 (MEDIUM)

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

EPSS Score
0.4%
Top 67% exploitable
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy