# CVE-2025-3933: 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.50%, higher than 44% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-07-11T09:22:27.103Z
- Modified: 2026-09-10T03:50:57.888Z
- Also known as: GHSA-37mw-44qp-f5jm, PYSEC-2026-1977
- 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 discovered in the Hugging Face Transformers library, specifically within the DonutProcessor class's `token2json()` method. This vulnerability affects versions 4.50.3 and earlier, and is fixed in version 4.52.1. The issue arises from the regex pattern `<s_(.*?)>` which can be exploited to cause excessive CPU consumption through crafted input strings due to catastrophic backtracking. This vulnerability can lead to service disruption, resource exhaustion, and potential API service vulnerabilities, impacting document processing tasks using the Donut model.

(As written by CVE List.)

## Affected

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

## 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.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- PyPA Advisory Database: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`

## References

- <https://huntr.com/bounties/25282953-5827-4384-bb6f-5790d275721b> (exploit, third-party-advisory, web)
- <https://github.com/huggingface/transformers/commit/ebbe9b12dd75b69f92100d684c47f923ee262a93> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-3933> (advisory)
- <https://github.com/huggingface/transformers/pull/37788> (web)
- <https://github.com/huggingface/transformers> (package)
- <https://pypi.org/project/transformers> (package)
- <https://github.com/advisories/GHSA-37mw-44qp-f5jm> (advisory)

## Sources

- CVE List: [CVE-2025-3933](https://www.cve.org/CVERecord?id=CVE-2025-3933), CVE Terms of Use, modified 2025-07-11
- GitHub Advisory Database: [GHSA-37mw-44qp-f5jm](https://github.com/advisories/GHSA-37mw-44qp-f5jm), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-3933](https://nvd.nist.gov/vuln/detail/CVE-2025-3933), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1977](https://osv.dev/vulnerability/PYSEC-2026-1977), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2025-3933 · Whole record: https://cve.day/CVE-2025-3933.json · Rebuilt by cve.day 2026-11-25T22:59:01.143Z
