CVE-2026-54316 — Vulnerability in @anthropic-ai/claude-code
Claude Code: Out-of-Band Data Exfiltration via Pre-Approved HuggingFace Domain in WebFetch
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.52%). Schedule for your next planned update.
Does your project use an affected @anthropic-ai/claude-code version?
Paste your package-lock.json to check it for CVE-2026-54316 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
Advisory Timeline
- First published June 17, 2026 (162 days ago).
- Last revised July 20, 2026 — 33 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install @anthropic-ai/claude-code@2.1.163
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: npm (1).
| Package | Fixed In |
|---|---|
| @anthropic-ai/claude-code npm · Affected: All versions | 2.1.163 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-183
- CWE-200Information ExposureMITRE
- CWE-515
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
References
Frequently Asked Questions
- What is CVE-2026-54316?
- Claude Code: Out-of-Band Data Exfiltration via Pre-Approved HuggingFace Domain in WebFetch. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 9.1/10).
- How do I check if my project is affected by CVE-2026-54316?
- CVE-2026-54316 affects @anthropic-ai/claude-code. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-54316 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is a below-median EPSS score — only 37.5% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2025-64755HIGH
@anthropic-ai/claude-code has Sed Command Validation Bypass that Allows Arbitrary File Writes
- CVE-2026-39861HIGH
Claude Code: Sandbox Escape via Symlink Following Allows Arbitrary File Write Outside Workspace
- CVE-2025-66032HIGH
Claude Code Command Validation Bypass Allows Arbitrary Code Execution
- CVE-2026-94543MEDIUM
Next.js has cache poisoning of SSG and ISR pages in self-hosted applications
- CVE-2026-94545MEDIUM
Satori-generated SVG has improper escaping