PT-2025-21933
CVE-2025-2099
·
Published
2025-05-19
·
Updated
2025-05-19
Description by
CVSS 3.1
7.5
HighMetricsAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Name of the Vulnerable Software and Affected Versions
huggingface/transformers version v4.48.3
Description
A vulnerability in the
preprocess string() function of the transformers.testing utils module allows for a Regular Expression Denial of Service (ReDoS) attack. The regular expression used to process code blocks in docstrings contains nested quantifiers, leading to exponential backtracking when processing input with a large number of newline characters. An attacker can exploit this by providing a specially crafted payload, causing high CPU usage and potential application downtime, effectively resulting in a Denial of Service (DoS) scenario.Recommendations
As a temporary workaround, consider disabling the
preprocess string() function until a patch is available.
Restrict access to the transformers.testing utils module to minimize the risk of exploitation.
Avoid using the preprocess string() function in the affected API endpoint until the issue is resolved.
At the moment, there is no information about a newer version that contains a fix for this vulnerability.Exploitability
Exploit
Impacts
Vendors
Affected products
Found an issue in the description? Have something to add? Feel free to write us 👾