6.0medium
Claude Code: Out-of-Band Data Exfiltration via Pre-Approved HuggingFace Domain in WebFetch
- Severity
- 6.0medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 6.34% (higher than 93% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-fg94-h982-f3mm
Description
Claude Code is an agentic coding tool. From 0.2.54 until 2.1.163, 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. This vulnerability is fixed in 2.1.163.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| anthropics claude-code | >= 0.2.54, < 2.1.163 | CVE List |
| @anthropic-ai/claude-code (npm) | from 0.2.54 before 2.1.163 | GitHub Advisory Database |
| anthropic claude_code | from 0.2.54 before 2.1.163 | NVD |
All scores
| GitHub_M | 6.0medium CVSS:4.0 | 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 |
| GitHub | 9.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| GitHub | medium CVSS:4.0 | 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 |
| NVD | 9.1critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
Classification
What each source says
CVE List
Claude Code is an agentic coding tool. From 0.2.54 until 2.1.163, 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. This vulnerability is fixed in 2.1.163.
GitHub Advisory Database
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.
NVD (es)
Claude Code es una herramienta de codificación agéntica. Desde la versión 0.2.54 hasta la 2.1.163, debido a que el nombre de host huggingface.co fue preaprobado como un nombre de host base para la herramienta WebFetch, cualquier ruta en ese dominio -incluidos los repositorios de modelos controlados por el atacante- fue autoaprobada sin una solicitud de permiso o sin estar sujeta a las restricciones de --allowedTools. Un atacante capaz de inyectar contenido no confiable en un contexto de Claude Code podría dirigirlo a emitir solicitudes WebFetch contra archivos de repositorio controlados por el atacante (p. ej., /resolve/main/config.json), lo que HuggingFace cuenta como descargas del lado del servidor, creando un canal encubierto fuera de banda para codificar y exfiltrar datos a los que Claude puede acceder, como archivos, variables de entorno o la salida de comandos. Explotar esto de forma fiable requería la capacidad de añadir contenido no confiable en una ventana de contexto de Claude Code. Esta vulnerabilidad está corregida en la versión 2.1.163.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-54316 changed 2026-06-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-fg94-h982-f3mm changed 2026-07-20 | CC-BY-4.0 |
| NVD | CVE-2026-54316 changed 2026-10-25 | Public domain |