CVE-2024-12720Huggingface Transformers
High 7.5 No auth needed
Follow: this CVE · Huggingface · Huggingface Transformers We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- 0.8% probability of exploitation in 30 days · percentile 54
- Auth required
- No
- Published
- Mar 20, 2025
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-1333
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
What happens
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).
What to do
- Apply the vendor's security update for Transformers.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | transformers |
< 4.48.0 |
4.48.0 |
pip install "transformers>=4.48.0" |
| PyPI | transformers |
< 4.48.0 |
4.48.0 |
pip install "transformers>=4.48.0" |
Per OSV / GitHub Advisories (GHSA-6rvg-6v2m-4j46, PYSEC-2026-1982). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| huggingface | transformers | < 4.48.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- huntr.com Vendor Advisory