CVE-2024-12720 json
Regular Expression Denial of Service (ReDoS) in huggingface/transformers
published 2025-03-20 19 mo ago modified 2026-08-13 2 mo ago also GHSA-6rvg-6v2m-4j46 , PYSEC-2026-1982 , EUVD-2025-7016
- cvss
- 5.3
- version 3.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.7%
- EPSS 0.7% chance of exploitation in 30 days, percentile 55%
- public exploits
- 0
- none known
Summary
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).
Patch / fix
- pypi transformers 4.48.0
- huggingface huggingface/transformers 4.48.0
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 19 mo ago
Exploit prediction
0.75% chance of exploitation in the next 30 days, higher than 55% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- huntr.com https://huntr.com/bounties/4bed1214-7835-4252-a853-22bbad891f98 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.0 | 5.3 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 3.0 | 5.3 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| OSV | 3.0 | 5.3 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | transformers | <4.48.0 |
4.48.0 |
Affected products
- huggingface huggingface/transformers
Classification
- Weakness
-
- CWE-1333 Inefficient Regular Expression Complexity
References
-
github.com
/huggingface/transformers/commit/deac971c469bcbb182c2e52da0b82fb3bf54cccf
web, patch
-
huntr.com
/bounties/4bed1214-7835-4252-a853-22bbad891f98
exploit, web, vendor-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2024-12720
advisory
-
github.com
/huggingface/transformers
package
-
pypi.org
/project/transformers
package
-
github.com
/advisories/GHSA-6rvg-6v2m-4j46
advisory
Sources
- CVE List CVE-2024-12720
- GitHub Advisory GHSA-6rvg-6v2m-4j46
- NVD CVE-2024-12720
- OSV PYSEC-2026-1982
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.