# CVE-2024-12720: Regular Expression Denial of Service (ReDoS) in huggingface/transformers

- Severity: Medium 5.3 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.75%, higher than 56% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-03-20T10:11:15.586Z
- Modified: 2026-08-13T20:11:58.209Z
- Also known as: GHSA-6rvg-6v2m-4j46, PYSEC-2026-1982
- Weaknesses: CWE-1333
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: @huntr_ai

## 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).

(As written by CVE List.)

## Affected

- huggingface huggingface/transformers: from unspecified before 4.48.0
- transformers (PyPI): before 4.48.0
- huggingface transformers: before 4.48.0

## Every score

- @huntr_ai: CVSS:3.0 5.3 Medium `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- GitHub: CVSS:3.0 5.3 Medium `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- PyPA Advisory Database: CVSS:3.0 5.3 Medium `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`

## References

- <https://huntr.com/bounties/4bed1214-7835-4252-a853-22bbad891f98> (exploit, vendor-advisory, web)
- <https://github.com/huggingface/transformers/commit/deac971c469bcbb182c2e52da0b82fb3bf54cccf> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-12720> (advisory)
- <https://github.com/huggingface/transformers> (package)
- <https://pypi.org/project/transformers> (package)
- <https://github.com/advisories/GHSA-6rvg-6v2m-4j46> (advisory)

## Sources

- CVE List: [CVE-2024-12720](https://www.cve.org/CVERecord?id=CVE-2024-12720), CVE Terms of Use, modified 2025-03-20
- GitHub Advisory Database: [GHSA-6rvg-6v2m-4j46](https://github.com/advisories/GHSA-6rvg-6v2m-4j46), CC-BY-4.0, modified 2026-08-13
- NVD: [CVE-2024-12720](https://nvd.nist.gov/vuln/detail/CVE-2024-12720), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1982](https://osv.dev/vulnerability/PYSEC-2026-1982), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2024-12720 · Whole record: https://cve.day/CVE-2024-12720.json · Rebuilt by cve.day 2026-11-25T22:58:52.361Z
