Regular Expression Exploit in Hugging Face Transformers Library
CVE-2025-3933
5.3MEDIUM
What is CVE-2025-3933?
A Regular Expression Denial of Service (ReDoS) vulnerability has been identified in the Hugging Face Transformers library, specifically in the DonutProcessor class's token2json() method. This issue is particularly concerning in versions 4.50.3 and earlier, where crafted input strings exploit a regex pattern <s_(.*?)>. Such exploitation can lead to excessive CPU usage due to catastrophic backtracking, resulting in service disruptions and resource exhaustion. Those utilizing document processing tasks with the Donut model may face potential risks and performance degradation as a consequence.
Affected Version(s)
huggingface/transformers < 4.52.1
References
CVSS V3.1
Score:
5.3
Severity:
MEDIUM
Confidentiality:
None
Integrity:
None
Availability:
None
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged
CVSS V3.0
Score:
5.3
Severity:
MEDIUM
Confidentiality:
None
Integrity:
None
Availability:
None
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged
Timeline
Vulnerability published
Vulnerability Reserved
