Resource Exhaustion Affecting text-generation-inference package, versions <3.3.6-r0


Severity

Recommended
0.0
high
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.05% (17th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Resource Exhaustion vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-CHAINGUARDLATEST-TEXTGENERATIONINFERENCE-13600370
  • published17 Oct 2025
  • disclosed23 Sept 2025

Introduced: 23 Sep 2025

CVE-2025-6921  (opens in a new tab)
CWE-400  (opens in a new tab)

How to fix?

Upgrade Chainguard text-generation-inference to version 3.3.6-r0 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream text-generation-inference package and not the text-generation-inference package as distributed by Chainguard. See How to fix? for Chainguard relevant fixed versions and status.

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.

CVSS Base Scores

version 3.1