CVE-2025-3262: huggingface/transformers · ReDoS
Affects huggingface/transformersSource CVE Database V5
Not known to be exploited · CVSS 5.3 Medium : upgrade to 4.51.0 when convenient.
Data as of 26 Oct 2026, 06:26 UTC
- EPSS
- 0.4% chance of exploitation in 30 days – higher than 42% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 4.51.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LExploitation evidence
Disclosed: evidence found.
CVE published 7 Jul 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.
What to do
Upgrade transformers to 4.51.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
PyPItransformerspkg:pypi/transformersOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
European organizations should take the following specific mitigation steps: 1) Identify all deployments using huggingface/transformers version 4.49.0 or earlier, especially those exposing chat or NLP interfaces to external or untrusted inputs. 2) Upgrade the transformers library to version 4.51.0 or later, where the inefficient regex has been optimized and the vulnerability fixed. 3) Implement input validation and sanitization to limit or reject inputs that could trigger excessive regex backtracking, such as unusually long or complex strings. 4) Employ runtime monitoring and anomaly detection to identify unusual CPU usage spikes or latency increases that may indicate attempted ReDoS attacks. 5) Where feasible, isolate NLP processing components behind rate limiting or request throttling to reduce the impact of potential abuse. 6) Conduct security testing including fuzzing and regex performance profiling on NLP input handlers to proactively detect similar inefficiencies. 7) Maintain an inventory of AI/ML components and their versions to ensure timely patching of vulnerabilities. These targeted actions go beyond generic advice by focusing on the specific vulnerable regex and operational context of huggingface transformers in AI applications.
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.