cve.bz

CVE-2025-2099

7.5 highEPSS 0.6%

High (7.5) in huggingface transformers. EPSS 0.6% chance of exploitation in the next 30 days. Fixed in transformers 4.49.0, 4.50.0.

A vulnerability in the `preprocess_string()` function of the `transformers.testing_utils` module in huggingface/transformers version v4.48.3 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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
0.6% chance of exploitation in the next 30 days; higher than 49% of CVEs (scores of 2026-10-31)
CWE
CWE-1333
Published
Modified
Record from
the NVD, synced

Affected

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-qq3j-4f4f-9583PyPItransformers<4.50.04.50.0
PYSEC-2025-40PyPItransformers<4.49.04.49.0

References

Check your stackJSON