CVE Catalog

CVE-2025-6638

HighCVSS 7.5
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.58%

49th percentile - higher than 49% of all known CVEs

Summary

A Regular Expression Denial of Service (ReDoS) vulnerability was found in the Hugging Face Transformers library, specifically in the MarianTokenizer's remove_language_code() method. It is present in version 4.52.4 and fixed in version 4.53.0.

Risk Assessment

Crafted input strings with malformed language code patterns can cause excessive CPU consumption and a potential denial of service. The risk affects services using MarianTokenizer to process user input.

Recommendation

Upgrade the Hugging Face Transformers library to version 4.53.0. Until then, limit or validate input processed by MarianTokenizer.

Other vulnerabilities in Hugging Face Transformers

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS