CVE-2025-3933Huggingface Transformers
Medium 5.3 No auth needed
Follow: this CVE · Huggingface · Huggingface Transformers We alert you by email or Slack (account required).
- Priority
- 47
- CVSS 3.1
- 5.3
- EPSS
- —
- Auth required
- No
- Published
- Jul 11, 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:L
What happens
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.
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.52.1 |
4.52.1 |
pip install "transformers>=4.52.1" |
| PyPI | transformers |
< 4.52.1 |
4.52.1 |
pip install "transformers>=4.52.1" |
Per OSV / GitHub Advisories (GHSA-37mw-44qp-f5jm, PYSEC-2026-1977). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| huggingface | transformers | < 4.52.1 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- huntr.com Exploit Third Party Advisory