CVE Explorer
CVE-2025-6921
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 is
Known exploited
Not asserted
Disputed
No
Stale source
No
Conflicts
0
Affected products and versions
1 source assertion{"product":"huggingface/transformers","vendor":"huggingface","versions":[{"lessThan":"4.53.0","status":"affected","version":"unspecified","versionType":"custom"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:7d84bfa995c436b924628a76ed8c144ec424bdd28a31507a1c5e3bf927fdebbc · sha256:8fb3b7512c25f7c1… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"LOW","baseScore":5.3,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","version":"3.0"},"metric_type":"cvssV3_0"}
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:7d84bfa995c436b924628a76ed8c144ec424bdd28a31507a1c5e3bf927fdebbc · sha256:8fb3b7512c25f7c1… · /containers/cna/metrics/0/cvssV3_0
CWE assertions
1 source assertion{"cweId":"CWE-400","description":"CWE-400 Uncontrolled Resource Consumption","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:7d84bfa995c436b924628a76ed8c144ec424bdd28a31507a1c5e3bf927fdebbc · sha256:8fb3b7512c25f7c1… · /containers/cna/problemTypes/0/descriptions/0
Source references
2 source assertions{"url":"https://github.com/huggingface/transformers/commit/47c34fba5c303576560cb29767efb452ff12b8be"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:7d84bfa995c436b924628a76ed8c144ec424bdd28a31507a1c5e3bf927fdebbc · sha256:8fb3b7512c25f7c1… · /containers/cna/references/1
{"url":"https://huntr.com/bounties/287d15a7-6e7c-45d2-8c05-11e305776f1f"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:7d84bfa995c436b924628a76ed8c144ec424bdd28a31507a1c5e3bf927fdebbc · sha256:8fb3b7512c25f7c1… · /containers/cna/references/0
Attribution and limitations
- CVE Program CVEList V5: Reproduce the MITRE copyright designation and CVE license in copies. Source →
Provider severity values are preserved separately. Baitaphish does not convert them into a risk rating, infer affected products, or treat EPSS as observed exploitation.