High severity · published Sep 12, 2025
CVE-2025-6638
Regular Expression Denial of Service (ReDoS) in huggingface/transformers
7.5
CVSS
0.6%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
None
Integrity
None
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.6% · higher than 46% 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
Affected product
HU
huggingface/transformers
huggingface
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
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
7.5
CVE-2025-6921
Regular Expression Denial of Service (ReDoS) in huggingface/transformers