PT-2025-29223 · Hugging Face · Huggingface/Transformers

CVE-2025-3933

·

Published

2025-04-05

·

Updated

2026-07-07

CVSS v3.1

5.3

Medium

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Name of the Vulnerable Software and Affected Versions: Hugging Face Transformers versions 4.50.3 and earlier Hugging Face Transformers version 4.52.1
Description: A Regular Expression Denial of Service (ReDoS) vulnerability exists in the Hugging Face Transformers library, specifically within the token2json() method of the DonutProcessor class. The issue stems from the regex pattern <s (.*?)> which can be exploited with crafted input strings, leading to catastrophic backtracking and excessive CPU consumption. This can result in service disruption and resource exhaustion, potentially impacting document processing tasks using the Donut model.
Recommendations: Hugging Face Transformers versions prior to 4.52.1 should be updated to version 4.52.1 or later.

Exploit

Fix

DoS

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

BDU:2026-03546
CVE-2025-3933
GHSA-37MW-44QP-F5JM
PYSEC-2026-1977

Affected Products

Huggingface/Transformers