5.3medium
Regular Expression Denial of Service (ReDoS) in huggingface/transformers
- Severity
- 5.3medium CVSS:3.0 by @huntr_ai
- Exploit likelihood
- 0.75% (higher than 56% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- @huntr_ai
- Also known as
- GHSA-6rvg-6v2m-4j46PYSEC-2026-1982
Description
A Regular Expression Denial of Service (ReDoS) vulnerability was identified in the huggingface/transformers library, specifically in the file tokenization_nougat_fast.py. The vulnerability occurs in the post_process_single() function, where a regular expression processes specially crafted input. The issue stems from the regex exhibiting exponential time complexity under certain conditions, leading to excessive backtracking. This can result in significantly high CPU usage and potential application downtime, effectively creating a Denial of Service (DoS) scenario. The affected version is v4.46.3 (latest).
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| huggingface huggingface/transformers | from unspecified before 4.48.0 | CVE List |
| transformers (PyPI) | before 4.48.0 | GitHub Advisory Database, PyPA Advisory Database |
| huggingface transformers | before 4.48.0 | NVD |
All scores
| @huntr_ai | 5.3medium CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| GitHub | 5.3medium CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| PyPA Advisory Database | 5.3medium CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
A Regular Expression Denial of Service (ReDoS) vulnerability was identified in the huggingface/transformers library, specifically in the file tokenization_nougat_fast.py. The vulnerability occurs in the post_process_single() function, where a regular expression processes specially crafted input. The issue stems from the regex exhibiting exponential time complexity under certain conditions, leading to excessive backtracking. This can result in significantly high CPU usage and potential application downtime, effectively creating a Denial of Service (DoS) scenario. The affected version is v4.46.3 (latest).
GitHub Advisory Database
A Regular Expression Denial of Service (ReDoS) vulnerability was identified in the huggingface/transformers library, specifically in the file tokenization_nougat_fast.py. The vulnerability occurs in the post_process_single() function, where a regular expression processes specially crafted input. The issue stems from the regex exhibiting exponential time complexity under certain conditions, leading to excessive backtracking. This can result in significantly high CPU usage and potential application downtime, effectively creating a Denial of Service (DoS) scenario. The affected version is v4.46.3.
NVD (es)
Se identificó una vulnerabilidad de denegación de servicio por expresión regular (ReDoS) en la librería huggingface/transformers, concretamente en el archivo tokenization_nougat_fast.py. La vulnerabilidad se produce en la función post_process_single(), donde una expresión regular procesa una entrada especialmente manipulada. El problema se debe a que la expresión regular presenta una complejidad temporal exponencial en determinadas condiciones, lo que provoca un retroceso excesivo. Esto puede resultar en un uso de CPU significativamente alto y un posible tiempo de inactividad de la aplicación, creando así un escenario de denegación de servicio (DoS). La versión afectada es la v4.46.3 (última versión).
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-12720 changed 2025-03-20 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-6rvg-6v2m-4j46 changed 2026-08-13 | CC-BY-4.0 |
| NVD | CVE-2024-12720 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1982 changed 2026-07-07 | CC-BY-4.0 |