Medium severity · published Jul 11, 2025
CVE-2025-3933
Regular Expression Denial of Service (ReDoS) in huggingface/transformers
5.3
CVSS
0.5%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
None
Integrity
None
Availability
Low
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.5% · higher than 42% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
HU
huggingface/transformers · huggingface
before 4.52.1 · source: vendor
TR
Transformers · Huggingface
before 4.52.1 · source: NVD
Affected product
HU
huggingface/transformers
huggingface
More from huggingface/transformers
9.6
CVE-2026-5241
Policy Bypass in LightGlue Nested Config Resolution in huggingface/transformers
9.6
CVE-2024-3568
Arbitrary Code Execution via Deserialization in huggingface/transformers
8.8
CVE-2023-6730
Deserialization of Untrusted Data in huggingface/transformers
7.8
CVE-2026-4372
Arbitrary Remote Code Execution via `_attn_implementation_internal` Config Injection in huggingface/transformers
7.8
CVE-2026-1839
Arbitrary Code Execution via Unsafe torch.load() in Trainer Checkpoint Loading in huggingface/transformers