CVE-2025-6921
NixOS vulnerability analysis and mitigation

Overview

CVE-2025-6921 affects the huggingface/transformers library versions prior to 4.53.0. The vulnerability is a Regular Expression Denial of Service (ReDoS) issue in the AdamWeightDecay optimizer. This vulnerability was discovered and disclosed on September 23, 2025 (NVD).

Technical details

The vulnerability exists in the _do_use_weight_decay method of the AdamWeightDecay optimizer, which processes user-controlled regular expressions in the include_in_weight_decay and exclude_from_weight_decay lists. When processing these regular expressions, the re.search call can trigger catastrophic backtracking, leading to 100% CPU utilization. The vulnerability has been assigned a CVSS v3.0 base score of 5.3 (Medium) with the vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L (NVD, Huntr).

Impact

When exploited, this vulnerability can cause the machine learning task to hang and render services unresponsive through 100% CPU utilization. The impact is limited to availability, with no direct effect on confidentiality or integrity of the system (NVD).

Mitigation and workarounds

The vulnerability has been fixed in version 4.53.0 of the huggingface/transformers library. The fix involves removing the use of regular expressions entirely, as evidenced by the patch commit (Github Commit). Users should upgrade to version 4.53.0 or later to mitigate this vulnerability.

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-22783HIGH8.1
  • NixOSNixOS
  • iris
NoYesJan 12, 2026
CVE-2026-0821MEDIUM6.9
  • NixOSNixOS
  • quickjs
NoNoJan 10, 2026
CVE-2025-68949MEDIUM5.3
  • NixOSNixOS
  • n8n
NoYesJan 13, 2026
CVE-2026-22784LOW2.3
  • NixOSNixOS
  • lychee
NoYesJan 12, 2026
CVE-2026-23497LOW1.3
  • NixOSNixOS
  • learning
NoYesJan 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management