Skip to content
MediumVulnerability

CVE-2025-3933: Hugging Face Transformers ReDoS in DonutProcessor token2json method

Identifier
CVE-2025-3933
Published
Record updated
View JSON
Affected
  • transformers <= 4.51.3
Fixed in
4.52.1
  • released May 20, 2025, 52 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.5%

Summary

CVE-2025-3933 is a Regular Expression Denial of Service (ReDoS) flaw in the Hugging Face Transformers library, within the `token2json()` method of the `DonutProcessor` class. It affects versions 4.50.3 and earlier. The regex `<s_(.*?)>` can be driven into catastrophic backtracking by crafted input strings, causing excessive CPU consumption, service disruption and resource exhaustion in document processing with the Donut model.

Mitigation

Fixed in 4.52.1.