Inefficient Regular Expression Complexity 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.07% (23rd 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 Inefficient Regular Expression Complexity vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-CHAINGUARDLATEST-TEXTGENERATIONINFERENCE-13600380
  • published17 Oct 2025
  • disclosed12 Sept 2025

Introduced: 12 Sep 2025

CVE-2025-6638  (opens in a new tab)
CWE-1333  (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.

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically affecting the MarianTokenizer's remove_language_code() method. This vulnerability is present in version 4.52.4 and has been fixed in version 4.53.0. The issue arises from inefficient regex processing, which can be exploited by crafted input strings containing malformed language code patterns, leading to excessive CPU consumption and potential denial of service.

CVSS Base Scores

version 3.1