CVE-2025-6051
JSON

5.3medium

Regular Expression Denial of Service (ReDoS) in huggingface/transformers

Severity
5.3medium CVSS:3.0 by @huntr_ai
Exploit likelihood
0.40% (higher than 36% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
@huntr_ai
Also known as
GHSA-rcv9-qm8p-9p6jPYSEC-2026-1988

Description

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically within the `normalize_numbers()` method of the `EnglishNormalizer` class. This vulnerability affects versions up to 4.52.4 and is fixed in version 4.53.0. The issue arises from the method's handling of numeric strings, which can be exploited using crafted input strings containing long sequences of digits, leading to excessive CPU consumption. This vulnerability impacts text-to-speech and number normalization tasks, potentially causing service disruption, resource exhaustion, and API vulnerabilities.

Affected

Product or packageVersionsReported by
huggingface huggingface/transformersfrom unspecified before 4.53.0CVE List
transformers (PyPI)before 4.53.0GitHub Advisory Database, PyPA Advisory Database
huggingface transformers4.52.4NVD

All scores

@huntr_ai5.3medium CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
GitHub5.3medium CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
PyPA Advisory Database5.3medium CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Classification

CWE-1333

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically within the `normalize_numbers()` method of the `EnglishNormalizer` class. This vulnerability affects versions up to 4.52.4 and is fixed in version 4.53.0. The issue arises from the method's handling of numeric strings, which can be exploited using crafted input strings containing long sequences of digits, leading to excessive CPU consumption. This vulnerability impacts text-to-speech and number normalization tasks, potentially causing service disruption, resource exhaustion, and API vulnerabilities.

NVD (es)

Se descubrió una vulnerabilidad de denegación de servicio por expresión regular (ReDoS) en la biblioteca Hugging Face Transformers, específicamente dentro del método 'normalize_numbers()' de la clase 'EnglishNormalizer'. Esta vulnerabilidad afecta a las versiones hasta la 4.52.4 y está corregida en la versión 4.53.0. El problema surge del manejo de cadenas numéricas por parte del método, que puede ser explotado utilizando cadenas de entrada manipuladas que contengan largas secuencias de dígitos, lo que lleva a un consumo excesivo de CPU. Esta vulnerabilidad impacta en las tareas de texto a voz y normalización de números, potencialmente causando interrupción del servicio, agotamiento de recursos y vulnerabilidades de API.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-6051 changed 2025-09-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-rcv9-qm8p-9p6j changed 2026-09-10CC-BY-4.0
NVDCVE-2025-6051 changed 2026-09-30Public domain
PyPA Advisory DatabasePYSEC-2026-1988 changed 2026-07-07CC-BY-4.0