{"cve":"CVE-2025-6638","nvd":{"published":"2025-09-12T11:15:31.770","modified":"2026-06-17T10:02:17.713","status":"Analyzed","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_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-1333"],"references":["https://github.com/huggingface/transformers/commit/47c34fba5c303576560cb29767efb452ff12b8be","https://huntr.com/bounties/6a6c933f-9ce8-4ded-8b3b-2c1444c61f36"],"products":["huggingface:transformers"],"source":"nvd","synced_at":"2026-10-19T22:08:41.295252406+00:00"},"epss":{"cve":"CVE-2025-6638","score":0.00555,"percentile":0.46315,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-59p9-h35m-wg4g","url":"https://osv.dev/vulnerability/GHSA-59p9-h35m-wg4g","summary":"Hugging Face Transformers is vulnerable to ReDoS through its MarianTokenizer","modified":"2026-09-10T03:50:58.113501288Z","packages":[{"ecosystem":"PyPI","name":"transformers","purl":"pkg:pypi/transformers","ranges":["<4.53.0"],"fixed":["4.53.0"]}]},{"id":"PYSEC-2026-1981","url":"https://osv.dev/vulnerability/PYSEC-2026-1981","summary":"Hugging Face Transformers is vulnerable to ReDoS through its MarianTokenizer","modified":"2026-07-07T17:48:13.629855933Z","packages":[{"ecosystem":"PyPI","name":"transformers","purl":"pkg:pypi/transformers","ranges":["<4.53.0"],"fixed":["4.53.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}