{"id":"CVE-2025-6638","published":"2025-09-12T10:46:07Z","modified":"2025-09-12T11:52:53Z","title":"Regular Expression Denial of Service (ReDoS) in huggingface/transformers","vendor":"huggingface","product":"huggingface/transformers","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00555,"percentile":0.47202,"provenance":"source"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"references":[{"url":"https://huntr.com/bounties/6a6c933f-9ce8-4ded-8b3b-2c1444c61f36","tags":[]},{"url":"https://github.com/huggingface/transformers/commit/47c34fba5c303576560cb29767efb452ff12b8be","tags":[]}],"priority":{"score":13.2,"factors":[{"name":"EPSS percentile","points":9.44},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"huggingface","affectedVersions":[{"vendor":"huggingface","product":"huggingface/transformers","versions":[">= unspecified, < 4.53.0"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2025-09-12T11:52:42.923436Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"transformers","vulnerableRanges":["<4.53.0"],"patched":["4.53.0"],"from":["GHSA-59p9-h35m-wg4g","PYSEC-2026-1981"],"provenance":"source"}],"summary":{"text":"A Regular Expression Denial of Service (ReDoS) flaw exists in the MarianTokenizer's remove_language_code() method of the Hugging Face Transformers library, caused by inefficient regex processing. An unauthenticated remote attacker can exploit it without user interaction by submitting crafted input strings containing malformed language code patterns, causing excessive CPU consumption and a denial of service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:47:42Z"},"euvd":{"id":"EUVD-2025-29032","exploited":false,"provenance":"source"}}