CVE-2025-2099 – transformers
Package
Manager: pip
Name: transformers
Vulnerable Version: >=0 <4.50.0
Severity
Level: Medium
CVSS v3.1: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
EPSS: 0.00076 pctl0.23509
Details
Hugging Face Transformers Regular Expression Denial of Service 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.
Metadata
Created: 2025-05-19T12:30:33Z
Modified: 2025-05-22T17:42:18Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/05/GHSA-qq3j-4f4f-9583/GHSA-qq3j-4f4f-9583.json
CWE IDs: ["CWE-1333"]
Alternative ID: GHSA-qq3j-4f4f-9583
Finding: F211
Auto approve: 1