CVE-2025-6638
highpriority · track · 30EPSS 0.006 · 46 %ileEUUSEPSS · scored 2026-10-27
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
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 5.3–7.5
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (3)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- GHSA-59p9-h35m-wg4gHugging Face Transformers is vulnerable to ReDoS through its MarianTokenizer2025-09-12ghsa · osvUS
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.
- PYSEC-2026-1981Hugging Face Transformers is vulnerable to ReDoS through its MarianTokenizer2026-07-07vendor · osvUS
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.
also known as (6)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (7)
External citations — patches, advisories, analysis.
- https://github.com/huggingface/transformers/commit/47c34fba5c303576560cb29767efb452ff12b8becnnvd
- https://github.com/huggingface/transformers/releasesPatchcnnvd
- https://huntr.com/bounties/6a6c933f-9ce8-4ded-8b3b-2c1444c61f36cnnvd
- https://github.com/huggingface/transformers/commit/47c34fba5c303576560cb29767efb452ff12b8beenisa_euvd
- https://huntr.com/bounties/6a6c933f-9ce8-4ded-8b3b-2c1444c61f36enisa_euvd
- https://github.com/huggingface/transformers/commit/47c34fba5c303576560cb29767efb452ff12b8bePatchnvd
- https://huntr.com/bounties/6a6c933f-9ce8-4ded-8b3b-2c1444c61f36ExploitThird Party Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan