PoC Monitor
← All CVEs
CVE-2025-2099published 19 May 2025 11:22 UTCData: JSON · API

Huggingface huggingface/transformers

Regular Expression Denial of Service (ReDoS) in huggingface/transformers

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.

First public PoC None yetno public PoC found
Public PoCs00 on GitHub
CVSS7.5high · scored by NVD · CWE-1333
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

huggingface huggingface/transformers
  • >= unspecified, < 4.50.0

Fixed in 4.50.0

Mitigation

Upgrade huggingface/transformers to 4.50.0 or later.

References

Timeline

Days relative to CVE publication
-2t=0+2+4+6+8CVE published19 May 2025 · t = 0

No public PoC found yet; not in CISA KEV.

PoC repositories

Found on GitHub.

No PoC repositories found yet.