{"cve":"CVE-2025-3264","nvd":{"published":"2025-07-07T10:15:27.500","modified":"2026-06-17T09:19:32.987","status":"Analyzed","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3},"cwes":["CWE-1333"],"references":["https://github.com/huggingface/transformers/commit/0720e206c6ba28887e4d60ef60a6a089f6c1cc76","https://huntr.com/bounties/3c6f7822-9992-476d-8cf0-b0b1623427df"],"products":["huggingface:transformers"],"source":"nvd","synced_at":"2026-10-19T22:04:28.436527499+00:00"},"epss":{"cve":"CVE-2025-3264","score":0.00496,"percentile":0.42558,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-jjph-296x-mrcr","url":"https://osv.dev/vulnerability/GHSA-jjph-296x-mrcr","summary":"Transformers vulnerable to ReDoS attack through its get_imports() function","modified":"2026-07-07T17:56:51.899728258Z","packages":[{"ecosystem":"PyPI","name":"transformers","purl":"pkg:pypi/transformers","ranges":["<4.51.0"],"fixed":["4.51.0"]}]},{"id":"PYSEC-2026-1985","url":"https://osv.dev/vulnerability/PYSEC-2026-1985","summary":"Transformers vulnerable to ReDoS attack through its get_imports() function","modified":"2026-07-07T17:48:14.362198100Z","packages":[{"ecosystem":"PyPI","name":"transformers","purl":"pkg:pypi/transformers","ranges":["<4.51.0"],"fixed":["4.51.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."]}