CVE-2025-3262: Regular Expression Denial of Service (ReDoS) in huggingface/transformers
Vulnerability summary
CVE-2025-3262 is a high (CVSS 7.5) vulnerability in huggingface huggingface/transformers. EPSS estimates a 0.49% chance of exploitation in the next 30 days, higher than 42.4% of scored vulnerabilities. 1 public exploit is recorded.
Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 07-07-2025PublishedVulnerability first disclosed.
- 07-07-2025Last modifiedVulnerability information updated.
Description
A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the huggingface/transformers repository, specifically in version 4.49.0. The vulnerability is due to inefficient regular expression complexity in the `SETTING_RE` variable within the `transformers/commands/chat.py` file. The regex contains repetition groups and non-optimized quantifiers, leading to exponential backtracking when processing 'almost matching' payloads. This can degrade application performance and potentially result in a denial-of-service (DoS) when handling specially crafted input strings. The issue is fixed in version 4.51.0.
CVSS metrics
4 scores · 3 sources · 2 versions- OSV · PypiEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LDiffers
- NVDNIST5.3MediumCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
EPSS trend
Probability
0.49%
Chance of exploitation in the next 30 days
Percentile
42%
Versus all other CVEs
30-day change
Increase +0.03 pp
From 0.46% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundExploit Reference (huntr.com)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Huggingface2 products
- huggingface/transformers≥ unspecified, < 4.51.0
- transformers< 4.51.0
PyPI1 product
- transformers≥ 4.49.0, < 4.51.0
2 vendors · 3 products