{"id":"CVE-2025-3264","published":"2025-07-07T09:55:11Z","modified":"2025-07-07T14:40:12Z","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 in the `get_imports()` function within `dynamic_module_utils.py`. This vulnerability affects versions 4.49.0 and is fixed in version 4.51.0. The issue arises from a regular expression pattern `\\s*try\\s*:.*?except.*?:` used to filter out try/except blocks from Python code, which can be exploited to cause excessive CPU consumption through crafted input strings due to catastrophic backtracking. This vulnerability can lead to remote code loading disruption, resource exhaustion in model serving, supply chain attack vectors, and development pipeline disruption.","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.00496,"percentile":0.4345,"provenance":"source"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"references":[{"url":"https://huntr.com/bounties/3c6f7822-9992-476d-8cf0-b0b1623427df","tags":[]},{"url":"https://github.com/huggingface/transformers/commit/0720e206c6ba28887e4d60ef60a6a089f6c1cc76","tags":[]}],"priority":{"score":12.4,"factors":[{"name":"EPSS percentile","points":8.69},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"huggingface","affectedVersions":[{"vendor":"huggingface","product":"huggingface/transformers","versions":[">= unspecified, < 4.51.0"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2025-07-07T14:37:34.878471Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"transformers","vulnerableRanges":["<4.51.0"],"patched":["4.51.0"],"from":["GHSA-jjph-296x-mrcr","PYSEC-2026-1985"],"provenance":"source"}],"summary":{"text":"A Regular Expression Denial of Service (ReDoS) flaw exists in the get_imports() function within dynamic_module_utils.py in the Hugging Face Transformers library (huggingface/transformers), where a regex pattern used to filter try/except blocks from Python code can be made to backtrack catastrophically. An attacker with network access and no privileges or user interaction can send crafted input that drives excessive CPU consumption, causing resource exhaustion.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:52:52Z"},"euvd":{"id":"EUVD-2025-20214","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-2099","published":"2025-05-19","fixed":"4.50.0","kev":false,"link":{"from":"CVE-2025-2099","to":"CVE-2025-3264","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:transformers","fromFixed":"4.50.0","toFixed":"4.51.0","daysApart":49}]}},{"cve":"CVE-2025-3262","published":"2025-07-07","fixed":"4.51.0","kev":false},{"cve":"CVE-2025-3263","published":"2025-07-07","fixed":"4.51.0","kev":false},{"cve":"CVE-2025-3264","published":"2025-07-07","fixed":"4.51.0","kev":false},{"cve":"CVE-2025-3777","published":"2025-07-07","fixed":"4.52.1","kev":false},{"cve":"CVE-2025-3933","published":"2025-07-11","fixed":"4.52.1","kev":false},{"cve":"CVE-2025-5197","published":"2025-08-06","fixed":"4.53.0","kev":false}],"package":"PyPI:transformers"}}