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

CVE-2025-6051
MEDIUM 5.3

At a glance

Source
NVD
EPSS
EPSS 0.38 % · percentile 32 ()
State
PUBLISHED
Published
Updated
Assigner
@huntr_ai
NVD status
Analyzed

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.

Weaknesses (CWE)

  • CWE-1333 — Inefficient Regular Expression Complexity

References

Scores

VersionScoreVectorScored by
CVSS 3.0MEDIUM 5.3CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L@huntr_ai
CVSS 3.0MEDIUM 5.3CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LNVD · security@huntr.dev (Secondary)

Advisories

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
huggingface · huggingface/transformersaffected unspecified < 4.53.0

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD