7.5

CVE-2025-6638: Regular Expression Denial of Service (ReDoS) in huggingface/transformers

Analyzed
AliasesGHSA-59p9-h35m-wg4gPYSEC-2026-1981CGA-37j3-gj73-3759
Published 12-09-2025Last modified 12-09-2025

Vulnerability summary

CVE-2025-6638 is a high (CVSS 7.5) vulnerability in huggingface huggingface/transformers. EPSS estimates a 0.56% chance of exploitation in the next 30 days, higher than 46.3% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Routine

Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
7.5/10
010
High · v3.1 (NVD)
EPSS score
0.56%
0%100%
Low · +0.03 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1reference

Advisory lineage

Upstream 0 · Downstream 0 · Related 2

Timeline

  1. 12-09-2025
    PublishedVulnerability first disclosed.
  2. 12-09-2025
    Last modifiedVulnerability information updated.

Description

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 metrics

5 scores · 4 sources · 2 versions

EPSS trend

Probability

0.56%

Chance of exploitation in the next 30 days

Percentile

46%

Versus all other CVEs

30-day change

Increase +0.03 pp

From 0.53% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • referenceUnverified

    Exploit Reference (huntr.com)

    Maturity: unknown

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

Chainguard6 products
  • py3.10-transformers-4.51All versions (No fix recorded)
  • py3.11-transformers-4.51All versions (No fix recorded)
  • py3.12-transformers-4.51All versions (No fix recorded)
  • py3.13-transformers-4.51All versions (No fix recorded)
  • text-generation-inference< 3.3.7-r8 | < 3.3.7-r9
Huggingface2 products
PyPI1 product
  • transformers< 4.53.0

3 vendors · 9 products

References

8 links