{"id":"CVE-2025-3262","published":"2025-07-07T09:54:39Z","modified":"2025-07-07T15:19:42Z","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 huggingface/transformers repository, specifically in version 4.49.0. The vulnerability is due to inefficient regular expression complexity in the `SETTING_RE` variable within the `transformers/commands/chat.py` file. The regex contains repetition groups and non-optimized quantifiers, leading to exponential backtracking when processing 'almost matching' payloads. This can degrade application performance and potentially result in a denial-of-service (DoS) when handling specially crafted input strings. The issue is fixed in version 4.51.0.","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.00494,"percentile":0.4335,"provenance":"source"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"references":[{"url":"https://huntr.com/bounties/ecf5ccc4-39e7-4fb3-b547-14a41d31a184","tags":[]},{"url":"https://github.com/huggingface/transformers/commit/0720e206c6ba28887e4d60ef60a6a089f6c1cc76","tags":[]}],"priority":{"score":12.4,"factors":[{"name":"EPSS percentile","points":8.67},{"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-07T15:19:35.031775Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"transformers","vulnerableRanges":[">=4.49.0, <4.51.0"],"patched":["4.51.0"],"from":["GHSA-489j-g2vx-39wf","PYSEC-2026-1979"],"provenance":"source"}],"summary":{"text":"The inefficient regular expression SETTING_RE in the transformers/commands/chat.py file of the huggingface/transformers repository is vulnerable to catastrophic backtracking because it uses repetition groups and non-optimized quantifiers. An attacker with network access and no authentication or user interaction can send specially crafted input strings that trigger exponential backtracking, degrading performance and potentially causing a denial of service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:52:52Z"},"euvd":{"id":"EUVD-2025-20217","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2024-12720","published":"2025-03-20","fixed":"4.48.0","kev":false},{"cve":"CVE-2025-1194","published":"2025-04-29","fixed":"4.50.0","kev":false},{"cve":"CVE-2025-2099","published":"2025-05-19","fixed":"4.50.0","kev":false,"link":{"from":"CVE-2025-2099","to":"CVE-2025-3262","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}],"package":"PyPI:transformers"}}