7.5

CVE-2025-2099: Regular Expression Denial of Service (ReDoS) in huggingface/transformers

Analyzed
AliasesGHSA-qq3j-4f4f-9583PYSEC-2025-40
Published 19-05-2025Last modified 19-05-2025

Vulnerability summary

CVE-2025-2099 is a high (CVSS 7.5) vulnerability in huggingface huggingface/transformers. EPSS estimates a 0.61% chance of exploitation in the next 30 days, higher than 49.1% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Routine

Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
7.5/10
010
High · v3.1 (NVD)
EPSS score
0.61%
0%100%
Low · +0.03 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1reference

Timeline

  1. 19-05-2025
    PublishedVulnerability first disclosed.
  2. 19-05-2025
    Last modifiedVulnerability information updated.

Description

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.

CVSS metrics

4 scores · 3 sources · 2 versions

EPSS trend

Probability

0.61%

Chance of exploitation in the next 30 days

Percentile

49%

Versus all other CVEs

30-day change

Increase +0.03 pp

From 0.58% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • referenceUnverified

    Exploit Reference (huntr.com)

    Maturity: unknown

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

Huggingface2 products
PyPI1 product
  • transformers< 4.50.0 | < 8cb522b4190bd556ce51be04942720650b1a3e57 | < 4.49.0

2 vendors · 3 products

References

7 links