ghsa-59p9-h35m-wg4g
Vulnerability from github
Published
2025-09-12 12:30
Modified
2025-09-15 13:57
Severity ?
Summary
Hugging Face Transformers is vulnerable to ReDoS through its MarianTokenizer
Details
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.
{ "affected": [ { "package": { "ecosystem": "PyPI", "name": "transformers" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "4.53.0" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2025-6638" ], "database_specific": { "cwe_ids": [ "CWE-1333" ], "github_reviewed": true, "github_reviewed_at": "2025-09-15T13:57:49Z", "nvd_published_at": "2025-09-12T11:15:31Z", "severity": "MODERATE" }, "details": "A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically affecting the MarianTokenizer\u0027s `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.", "id": "GHSA-59p9-h35m-wg4g", "modified": "2025-09-15T13:57:49Z", "published": "2025-09-12T12:30:23Z", "references": [ { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-6638" }, { "type": "WEB", "url": "https://github.com/huggingface/transformers/commit/47c34fba5c303576560cb29767efb452ff12b8be" }, { "type": "WEB", "url": "https://github.com/huggingface/transformers/commit/d37f7517972f67e3f2194c000ed0f87f064e5099" }, { "type": "PACKAGE", "url": "https://github.com/huggingface/transformers" }, { "type": "WEB", "url": "https://huntr.com/bounties/6a6c933f-9ce8-4ded-8b3b-2c1444c61f36" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L", "type": "CVSS_V3" } ], "summary": "Hugging Face Transformers is vulnerable to ReDoS through its MarianTokenizer" }
Loading...
Loading...
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.