CVE-2025-2099

Source
https://cve.org/CVERecord?id=CVE-2025-2099
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-2099.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-2099
Aliases
Published
2025-05-19T12:15:19.640Z
Modified
2026-03-03T01:23:20.747127Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

Git / github.com/huggingface/transformers

Affected ranges

Type
GIT
Repo
https://github.com/huggingface/transformers
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected

Affected versions

0.*
0.1.2
0.5.0
1.*
1.0
1.1.0
1.2.0
3.*
3.0.1
4.*
4.3.0.rc1
v0.*
v0.1.2
v0.2.0
v0.3.0
v0.4.0
v0.5.0
v0.5.1
v0.6.0
v0.6.1
v0.6.2
v1.*
v1.0.0
v2.*
v2.0.0
v2.1.0
v2.1.1
v2.10.0
v2.11.0
v2.2.0
v2.2.1
v2.2.2
v2.3.0
v2.4.0
v2.4.1
v2.5.0
v2.5.1
v2.6.0
v2.7.0
v2.8.0
v2.9.0
v2.9.1
v3.*
v3.0.0
v3.0.1
v3.0.2
v3.1.0
v3.2.0
v3.3.0
v3.3.1
v3.4.0
v3.5.0
v4.*
v4.0.0-rc-1
v4.1.0
v4.1.1
v4.10.0
v4.11.0
v4.12.0
v4.13.0
v4.14.0
v4.15.0
v4.16.0
v4.2.0
v4.3.0.rc1
v4.33.1
v4.4.0
v4.48.0
v4.48.1
v4.48.2
v4.48.3
v4.5.0
v4.6.0
v4.7.0
v4.8.0
v4.9.0

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-2099.json"