Regular Expression Denial of Service (ReDoS) in huggingface/transformers (huggingface huggingface/transformers)
En bref
- Source
- NVD
- EPSS
- EPSS 0.50 % · centile 43 ()
- État
- PUBLISHED
- Publiée
- Mise à jour
- Attribuée par
- @huntr_ai
- Statut NVD
- Analyzed
Description
A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically in the `get_imports()` function within `dynamic_module_utils.py`. This vulnerability affects versions 4.49.0 and is fixed in version 4.51.0. The issue arises from a regular expression pattern `\s*try\s*:.*?except.*?:` used to filter out try/except blocks from Python code, which can be exploited to cause excessive CPU consumption through crafted input strings due to catastrophic backtracking. This vulnerability can lead to remote code loading disruption, resource exhaustion in model serving, supply chain attack vectors, and development pipeline disruption.
Faiblesses (CWE)
- CWE-1333 — Complexité inefficace d'expression régulière (ReDoS)
Références
Scores
| Version | Score | Vecteur | Évalué par |
|---|---|---|---|
| CVSS 3.0 | MEDIUM 5.3 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L | @huntr_ai |
| CVSS 3.0 | MEDIUM 5.3 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L | NVD · security@huntr.dev (Secondary) |
Avis
- GHSA-jjph-296x-mrcr — Transformers vulnerable to ReDoS attack through its get_imports() function
- PYSEC-2026-1985 — Transformers vulnerable to ReDoS attack through its get_imports() function
Références européennes
- ENISA EUVD · EUVD-2025-20214
- GCVE · GCVE-0-2025-3264
Avis du CERT-FR
- CERTFR-2026-AVI-0556 — Multiples vulnérabilités dans les produits VMware · cert.ssi.gouv.fr
- CERTFR-2025-AVI-0969 — Multiples vulnérabilités dans les produits VMware · cert.ssi.gouv.fr
Configurations affectées (CPE NVD)
cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:*≥ 4.49.0 < 4.51.0
Produits affectés
| Produit | Versions |
|---|---|
| huggingface · huggingface/transformers | affected unspecified < 4.51.0 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |