CVE-2024-12720
highpriority · track · 30EPSS 0.007 · 55 %ileEUUSEPSS · scored 2026-10-27
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).
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 5.3–7.5
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (3)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- GHSA-6rvg-6v2m-4j46Transformers Regular Expression Denial of Service (ReDoS) vulnerability2025-03-20ghsa · osvUS
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.
- PYSEC-2026-1982Transformers Regular Expression Denial of Service (ReDoS) vulnerability2026-07-07vendor · osvUS
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.
also known as (6)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (7)
External citations — patches, advisories, analysis.
- https://github.com/huggingface/transformers/commit/deac971c469bcbb182c2e52da0b82fb3bf54cccfcnnvd
- https://github.com/huggingface/transformers/releases/tag/v4.49.0-Mistral-3Patchcnnvd
- https://huntr.com/bounties/4bed1214-7835-4252-a853-22bbad891f98cnnvd
- https://github.com/huggingface/transformers/commit/deac971c469bcbb182c2e52da0b82fb3bf54cccfenisa_euvd
- https://huntr.com/bounties/4bed1214-7835-4252-a853-22bbad891f98enisa_euvd
- https://github.com/huggingface/transformers/commit/deac971c469bcbb182c2e52da0b82fb3bf54cccfPatchnvd
- https://huntr.com/bounties/4bed1214-7835-4252-a853-22bbad891f98Vendor Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan