CVE-2025-3933

published 11 Jul 2025 · updated 11 Jul 2025

Regular Expression Denial of Service (ReDoS) in huggingface/transformers

5.3MediumCVSS 5.3EPSS 0%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in 4.52.1.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
huggingface<4.52.14.52.1

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2025-3933 severity on Zeptric[![CVE-2025-3933](https://zeptric.io/badge/cve/CVE-2025-3933.svg)](https://zeptric.io/cve/CVE-2025-3933)