CVE-2025-6921: huggingface/transformers · Uncontrolled Resource Consumption
Affects huggingface/transformersSource CVE Database V5
Not known to be exploited · CVSS 5.3 Medium : upgrade to 4.53.0 when convenient.
Data as of 26 Oct 2026, 09:16 UTC
- EPSS
- 0.5% chance of exploitation in 30 days – higher than 43% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 4.53.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 23 Sep 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 26 Oct 2026.
What to do
Upgrade huggingface/transformers to 4.53.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| huggingface huggingface/transformers | Affected
| Fixed in
|
AI-suggested
A fix is available in huggingface/transformers version 4.53.0 and later. Users should upgrade to version 4.53.0 or newer to remediate this vulnerability. No vendor advisory content was provided to indicate alternative mitigations or if the issue is already mitigated in other ways. Patch status is confirmed by the version boundary in the affectedVersions field.
Description
A Regular Expression Denial of Service (ReDoS) vulnerability exists in the huggingface/transformers library versions prior to 4.53.0. It affects the AdamWeightDecay optimizer's _do_use_weight_decay method, which processes user-controlled regular expressions. Maliciously crafted regex patterns can cause catastrophic backtracking during regex evaluation, leading to 100% CPU usage and denial of service by hanging the machine learning task.