Regular Expression Denial of Service (ReDoS) in huggingface/transformers
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-1333.
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).
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| huggingface | huggingface/transformers | before 4.48.0 | 4.48.0 | Patch available | CNA |
| — | transformers (PyPI) | before 4.48.0 | 4.48.0 | Patch available | GHSA-6rvg-6v2m-4j46 |
- huggingface/transformers Vendorhuggingface Affected before 4.48.0 Fixed in 4.48.0 Patch available CNA
- transformers (PyPI) Vendor— Affected before 4.48.0 Fixed in 4.48.0 Patch available GHSA-6rvg-6v2m-4j46
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:* | before 4.48.0 | Vulnerable | huggingface |
- cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:* Versions before 4.48.0 Vulnerable ·huggingface
Remediation
- Fix · CNA huggingface/transformers (huggingface) Fixed in 4.48.0
- Fix · GHSA-6rvg-6v2m-4j46 transformers (PyPI) Fixed in 4.48.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-12720
- 2026-10-03 Alias added: GHSA-6rvg-6v2m-4j46
References
More huggingface Transformers vulnerabilities
- TI-2026-04577 Policy Bypass in LightGlue Nested Config Resolution in huggingface/transformers CVSS 3.1CRITICAL 9.6
- TI-2025-06294 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
- TI-2025-06027 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
- TI-2025-02858 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
- TI-2025-01837 Regular Expression Denial of Service (ReDoS) in huggingface/transformers CVSS 3.1HIGH 7.5
- TI-2026-01514 Arbitrary Code Execution via Unsafe torch.load() in Trainer Checkpoint Loading in huggingface/transformers CVSS 3.1HIGH 7.8
Sources
- CVE-2024-12720 · CVE Program
- CVE-2024-12720 · NVD
- FIRST EPSS
- GHSA-6rvg-6v2m-4j46 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences