Hugging Face Transformers downloads custom generation code before trust consent
CVE-2026-80047 · GHSA-x9r9-c232-4q39 · published 2026-09-01 · updated 2026-09-30
- Severity
- High
- CVSS score
- 7.8
- Chance of exploitation (EPSS)
- 0.10%
- Fixed in
- No fix yet
- Exploitation No known exploitation
- Automatable No
- Technical impact Total
- CISA SSVC
A vulnerability in Hugging Face Transformers (versions 4.49.0, <= 5.8.1) allows remote Python files to be written to local disk without user consent when using GenerativePreTrainedModel.load_custom_generate(). The function fetches and caches a remote module file before performing the required trust_remote_code consent check, inverting the security model enforced by other code-loading paths (such as AutoConfig, AutoModel, and AutoTokenizer). As a result, attacker‑controlled Python code from custom_generate/generate.py is copied into the user’s ~/.cache/huggingface/modules directory even if the user declines the trust prompt. …
No fixed release is listed yet for transformers. Limit what it can reach, or stop using it until a fix ships, and follow the source advisory for updates.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| transformers | PyPI | >= 4.49.0, <= 5.8.1 | No fix yet |
- CriticalLiteLLM has SQL Injection in Proxy API key verificationlitellmExploited
- Criticaln8n Vulnerable to Remote Code Execution via Expression Injectionn8n, n8nExploited
- HighLiteLLM has a sandbox escape in custom-code guardraillitellmExploited
- HighLangflow affected by Remote Code Execution via validate_code() exec()langflowExploited
- CriticalJupyter MCP Server: Browser DNS rebinding can hijack the Jupyter backend through management routesjupyter-mcp-server
- Criticalmem0ai Databricks vector store vulnerable to SQL injectionmem0ai
- Criticaltransformers has a Deserialization of Untrusted Data vulnerabilitytransformers
- HighTransformers save_pretrained path traversal allows arbitrary file writes through chat template namestransformers
- Highhuggingface/transformers: Arbitrary Code Execution During Model Initialization in the LightGlue Model Loading Pathtransformers
- HighHuggingFace transformers vulnerable to remote code executiontransformers
- HighDeserialization of Untrusted Data in Hugging Face Transformerstransformers
- HighDeserialization of Untrusted Data in Hugging Face Transformerstransformers
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.