Advisory record · GHSA-4w7r-h757-3r74

Hugging Face Transformers vulnerable to Regular Expression Denial of Service (ReDoS) in the AdamWeightDecay optimizer

CVSS 5.3 MediumEPSS 0.0051 · 44th percentile

Published by the GitHub Advisory Database at 23 Sept 2025, 15:31 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

PackageEcosystemAffectedFixed in
transformersPyPI<4.53.04.53.0
Identifiers
GHSA-4w7r-h757-3r74 · CVE-2025-6921 · PYSEC-2026-1980
Weakness (CWE)
CWE-400
Published
23 Sept 2025
Updated
10 Sept 2026

Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

Hugging Face Transformers versions before 4.53.0 are vulnerable to regular expression denial of service in the AdamWeightDecay optimizer. An attacker who can control the regex patterns in the include_in_weight_decay or exclude_from_weight_decay lists can cause catastrophic backtracking, pegging CPU at 100% and hanging the task or making a service unresponsive. Upgrade to transformers 4.53.0 or later.

Written 5 Nov 2026.

Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

Severity and exploitation

ScoreRatingCVSSVectorSource
5.3 Medium 3.0 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L CNA (@huntr_ai)
  • CISA KEV Not listed.
  • EPSS 0.0051, the 44th percentile, on 16 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

Timeline

  1. 31 Oct 2026, 14:34 UTC First seen by agentprime
  2. 31 Oct 2026, 14:34 UTC Confirmed by OSV

Sources

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.