Patchwire CVEs, their patch status, and feeds to follow them

CVE-2025-6921

Fixed in a distro release EPSS <1%CVSS 5.3

The huggingface/transformers library, versions prior to 4.53.0, is vulnerable to Regular Expression Denial of Service (ReDoS) in the AdamWeightDecay optimizer. The vulnerability arises from the _do_use_weight_decay method, which processes user-controlled regular expressions in the include_in_weight_decay and exclude_from_weight_decay lists. Malicious regular expressions can cause catastrophic backtracking during the re.search call, leading to 100% CPU utilization and a denial of service. This issue can be exploited by attackers who can control the patterns in these lists, potentially causing the machine learning task to hang and rendering services unresponsive.

Published 2025-09-23 · CVE record · OSV

Products: huggingface/transformers

Fixed upstream

EcosystemPackageFixed in
PyPItransformers4.53.0

Distro releases

ReleasePackageFixed in
Chainguardpy3.10-transformers-4.51no fix
Chainguardpy3.11-text-generation-inference3.3.6-r3
Chainguardpy3.11-transformers-4.51no fix
Chainguardpy3.12-transformers-4.51no fix
Chainguardpy3.13-transformers-4.51no fix
Chainguardtext-generation-inference3.3.7-r8
Chainguardtext-generation-inference3.3.6-r3
Chainguardtext-generation-inference3.3.7-r9
Chainguardtext-generation-inference-compat3.3.6-r3
openSUSE Tumbleweedpython-transformers5.15.0-1.1