CVE-2026-80047
CVE-2026-80047 · Hugging Face Transformers library writes remote code to disk prior to consent check
Cette page présente des faits issus de sources publiques. Consultez l’avis original avant toute mise à jour.
A vulnerability in Hugging Face Transformers (versions 4.57.0 to 5.16.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. Although execution is correctly gated, the file write is not reversible and can persist across sessions. This can lead to persistent, unauthorized files on disk and stale cache collisions where cached attacker code may later be executed during trusted model loads. The issue stems from an unconditional file write in dynamic_module_utils.py prior to any trust verification.
CVSS 7.8 · Élevée · EPSS 0,1%
- Publication
- Mise à jour
Pile logicielle: python
Produits et versions concernés
transformers
- Versions du logiciel
- ≥ 4.57.0, ≤ 5.16.1: Concernée (custom)
Aucun correctif publié
transformers PyPI
- Versions du logiciel
- 4.49.0
- 4.50.0
- 4.50.1
- 4.50.2
- 4.50.3
- 4.51.0
- 4.51.1
- 4.51.2
- 4.51.3
- 4.52.0
- 4.52.1
- 4.52.2
- 4.52.3
- 4.52.4
- 4.53.0
- 4.53.1
- 4.53.2
- 4.53.3
- 4.54.0
- 4.54.1
- 4.55.0
- 4.55.1
- 4.55.2
- 4.55.3
- 4.55.4
- 4.56.0
- 4.56.1
- 4.56.2
- 4.57.0
- 4.57.1
- 4.57.2
- 4.57.3
- 4.57.4
- 4.57.5
- 4.57.6
- 5.0.0
- 5.0.0rc0
- 5.0.0rc1
- 5.0.0rc2
- 5.0.0rc3
- 5.1.0
- 5.2.0
- 5.3.0
- 5.4.0
- 5.5.0
- 5.5.1
- 5.5.2
- 5.5.3
- 5.5.4
- 5.6.0
- 5.6.1
- 5.6.2
- 5.7.0
- 5.8.0
- 5.8.1
- Plages de versions concernées
- ECOSYSTEM: ≥ 4.49.0, ≤ 5.8.1
Aucun correctif publié