Skip to main content
VulnerabilityPublished

CVE-2025-6921: huggingface/transformers · Uncontrolled Resource Consumption

Affects huggingface/transformersSource CVE Database V5

0

Not known to be exploited · CVSS 5.3 Medium : upgrade to 4.53.0 when convenient.

Data as of 26 Oct 2026, 14:05 UTC

CVSS 3.0 base score
5.3Medium
How severe the flaw is on the 0–10 CVSS scale.
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:L

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 23 Sep 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
huggingface huggingface/transformersAffected
  • <4.53.0
Fixed in
  • 4.53.0

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.

References

Community reviews

Loading reviews…