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

Published Sep 14, 2025
·
Updated

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically within the normalizenumbers() 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 Software

3 affected componentsFixes available
Hugging Face Transformers<=4.52.4
pip/transformers<4.53.0
4.53.0
huggingface transformers=4.52.4

Event History

Sep 14, 2025
CVE Published
via MITRE·05:03 PM
Data Sourced
via MITRE·05:03 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:15 PM
RemedyAffected Software
Advisory Published
via GitHub·06:30 PM
Data Sourced
via GitHub·06:30 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-6051?

CVE-2025-6051 has a severity rating that indicates a Regular Expression Denial of Service (ReDoS) vulnerability affecting specific methods in the Hugging Face Transformers library.

2

How do I fix CVE-2025-6051?

To fix CVE-2025-6051, upgrade the Hugging Face Transformers library to version 4.53.0 or later.

3

Which versions are affected by CVE-2025-6051?

CVE-2025-6051 affects versions of Hugging Face Transformers up to and including 4.52.4.

4

What type of vulnerability is CVE-2025-6051?

CVE-2025-6051 is classified as a Regular Expression Denial of Service (ReDoS) vulnerability.

5

What function in the Hugging Face Transformers library is vulnerable in CVE-2025-6051?

The vulnerable function in CVE-2025-6051 is the `normalize_numbers()` method of the `EnglishNormalizer` class.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203