HuggingFace transformers vulnerable to remote code execution
A critical remote code execution vulnerability exists in all versions of the HuggingFace transformers library prior to version 5.3.0. The vulnerability allows an attacker to craft a malicious config.json file containing the _attn_implementation_internal field set to an attacker-controlled HuggingFace Hub repository ID. When a victim loads this model using the standard AutoModelForCausalLM.from_pretrained() API, the library downloads and executes arbitrary Python code from the attacker's repository with the victim's full OS privileges. This issue arises due to unfiltered deserialization of configuration attributes, insufficient sanitization of internal fields, and unsandboxed execution of downloaded kernels. The vulnerability bypasses the trust_remote_code security mechanism, is invisible to the victim, and exploits the standard documented usage pattern, making it particularly severe. Users are advised to upgrade to version 5.3.0 or later to mitigate this issue.
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Python (PyPI) | transformers | < 5.3.0 | 5.3.0 |
Referencias
- Vector CVSS
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H- Debilidad (CWE)
CWE-1066, CWE-502- Plataforma
- Python (PyPI)
- Paquete
transformers- Publicada
- 24.05.2026
- Actualizado
- 11.10.2026 15:17
Fuentes y licencias
OSV / GitHub Advisory Database - PYSEC-2026-2289 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-29pf-2h5f-8g72 - CC BY 4.0
Historial de vulnerabilidades: transformers
Todas las vulnerabilidades publicadas de este paquete (Python (PyPI)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 32
- Primera → última
- 05.2023 09.2026
- Sin corrección
- 9
- Explotada en ataques
- 0
Distribución por gravedad
- Alta 18
- Media 12
- Baja 2
Divulgaciones por año
- 2023: 3
- 2024: 4
- 2025: 20
- 2026: 5
-
HuggingFace transformers vulnerable to remote code execution esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.