cbcvebase.
CVE-2025-2099
published 2025-05-19

CVE-2025-2099: A vulnerability in the `preprocess_string()` function of the `transformers.testing_utils` module in huggingface/transformers version v4.48.3 allows for a…

PriorityP338high7.5CVSS 3.1
AVNACLPRNUINSUCNINAH
EPSS
0.51%
39.4th percentile
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.

Affected

5 ranges
VendorProductVersion rangeFixed in
huggingfacehuggingface_transformers>= unspecified < 4.50.04.50.0
huggingfacetransformers<= 4.48.3
huggingfacetransformers>= 0 < 8cb522b4190bd556ce51be04942720650b1a3e578cb522b4190bd556ce51be04942720650b1a3e57
huggingfacetransformers>= 0 < 4.49.04.49.0
huggingfacetransformers>= 0 < 4.50.04.50.0

CVSS provenance

nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
nvdv3.05.3MEDIUMCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
vendor_redhat7.5HIGH
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.