Medium severity · published Sep 14, 2025
CVE-2025-6051
Regular Expression Denial of Service (ReDoS) in huggingface/transformers
5.3
CVSS
0.4%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
None
Integrity
None
Availability
Low
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.4% · higher than 32% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
HU
huggingface/transformers · huggingface
before 4.53.0 · source: vendor
TR
Transformers · Huggingface
4.52.4 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-6051
CVE.org
https://www.cve.org/CVERecord?id=CVE-2025-6051
Patch
https://github.com/huggingface/transformers/commit/ba8eaba9865618253f997784aa565b96206426f0
Exploit
https://huntr.com/bounties/af929523-7b59-418a-bf55-301830b2ac9d
More from huggingface/transformers
9.6
CVE-2026-5241
Policy Bypass in LightGlue Nested Config Resolution in huggingface/transformers
9.6
CVE-2024-3568
Arbitrary Code Execution via Deserialization in huggingface/transformers
8.8
CVE-2023-6730
Deserialization of Untrusted Data in huggingface/transformers
7.8
CVE-2026-4372
Arbitrary Remote Code Execution via `_attn_implementation_internal` Config Injection in huggingface/transformers
7.8
CVE-2026-1839
Arbitrary Code Execution via Unsafe torch.load() in Trainer Checkpoint Loading in huggingface/transformers
