GHSA-x9r9-c232-4q39
Hugging Face Transformers downloads custom generation code before trust consent
Published Sep 1, 2026 · Source: GitHub Advisory Database (via OSV.dev). Data collected Sat, 28 Nov 2026 19:06:22 GMT.
The facts
| Advisory id | GHSA-x9r9-c232-4q39 |
|---|---|
| CVE | CVE-2026-80047 |
| Package | transformers PyPI: transformers |
| Published | Sep 1, 2026 |
| Source severity | HIGH |
| Our severity | medium · 62 Advisory severity: HIGH · Published 89 days ago · Confidence: GitHub Advisory Database / OSV · See the rules |
| Fix | No fixed version was listed in the record we received |
| Source | GitHub Advisory Database (via OSV.dev) |
Summary AI summary
Hugging Face Transformers versions 4.49.0 to 5.8.1 write custom code to local disk without user consent.
Excerpt from the source
Copied from the official record, trimmed. Read the full source before acting.
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
What to do
Update to version 5.8.2 or later of Hugging Face Transformers.
Other recent advisories for this package
- PYSEC-2026-3929 · Sep 10, 2026 · Transformers save_pretrained path traversal allows arbitrary file writes through chat template names
This page restates a public advisory. Confirm the facts on the linked source before you act. BigBadAI is independent and not affiliated with the package authors. Data collected .