CVE-2025-3933
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
transformersPyPI | < 4.52.1 | 4.52.1 |
Affected products
5- osv-coords4 versionspkg:apk/chainguard/py3.11-text-generation-inferencepkg:apk/chainguard/text-generation-inferencepkg:apk/chainguard/text-generation-inference-compatpkg:pypi/transformers
< 3.3.6-r3+ 3 more
- (no CPE)range: < 3.3.6-r3
- (no CPE)range: < 3.3.7-r9
- (no CPE)range: < 3.3.6-r3
- (no CPE)range: < 4.52.1
- huggingface/huggingface/transformersv5Range: unspecified
Patches
Vulnerability mechanics
References
5- github.com/huggingface/transformers/commit/ebbe9b12dd75b69f92100d684c47f923ee262a93nvdPatchWEB
- huntr.com/bounties/25282953-5827-4384-bb6f-5790d275721bnvdExploitThird Party AdvisoryWEB
- github.com/advisories/GHSA-37mw-44qp-f5jmghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-3933ghsaADVISORY
- github.com/huggingface/transformers/pull/37788ghsaWEB
News mentions
0No linked articles in our index yet.