{"id":"CVE-2025-3262","aliases":["CVE-2025-3262","GHSA-489j-g2vx-39wf","PYSEC-2026-1979"],"related":[],"kind":"vulnerability","state":"published","title":"Regular Expression Denial of Service (ReDoS) in huggingface/transformers","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"Se descubrió una vulnerabilidad de denegación de servicio por expresión regular (ReDoS) en el repositorio huggingface/transformers, concretamente en la versión 4.49.0. La vulnerabilidad se debe a la complejidad ineficiente de la expresión regular en la variable `SETTING_RE` del archivo `transformers/commands/chat.py`. La expresión regular contiene grupos de repetición y cuantificadores no optimizados, lo que provoca un retroceso exponencial al procesar payloads casi coincidentes. Esto puede reducir el rendimiento de la aplicación y potencialmente provocar una denegación de servicio (DoS) al procesar cadenas de entrada especialmente manipuladas. El problema se ha corregido en la versión 4.51.0.","source":"nvd"}],"published":"2025-07-07T09:54:39.079Z","modified":"2026-07-07T17:56:54.298Z","severity":{"scorer":"@huntr_ai","scheme":"CVSS: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,"rating":"MEDIUM"},"severities":[{"scorer":"@huntr_ai","scheme":"CVSS: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,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS: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,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-1333"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"4.51.0","status":"affected"}],"vendor":"huggingface","product":"huggingface/transformers","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"4.49.0","status":"affected","fixed":"4.51.0"}],"ecosystem":"PyPI","package":"transformers","purl":"pkg:pypi/transformers","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.51.0"}],"vendor":"huggingface","product":"transformers","cpe":"cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"4.49.0","status":"affected","fixed":"4.51.0"}],"ecosystem":"PyPI","package":"transformers","purl":"pkg:pypi/transformers","source":"pysec"}],"references":[{"url":"https://huntr.com/bounties/ecf5ccc4-39e7-4fb3-b547-14a41d31a184","tags":["exploit","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/huggingface/transformers/commit/0720e206c6ba28887e4d60ef60a6a089f6c1cc76","tags":["patch","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-3262","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/huggingface/transformers/commit/126abe3461762e5fc180e7e614391d1b4ab051ca","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/huggingface/transformers","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/transformers","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-489j-g2vx-39wf","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"@huntr_ai","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-07-07T15:19:35.031Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-3262","url":"https://www.cve.org/CVERecord?id=CVE-2025-3262","licence":"CVE Terms of Use","modified":"2025-07-07T15:19:42.413Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-489j-g2vx-39wf","url":"https://github.com/advisories/GHSA-489j-g2vx-39wf","licence":"CC-BY-4.0","modified":"2026-07-07T17:56:54.298Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-3262","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-3262","licence":"Public domain","modified":"2026-06-17T09:19:32.770Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1979","url":"https://osv.dev/vulnerability/PYSEC-2026-1979","licence":"CC-BY-4.0","modified":"2026-07-07T17:48:13.616Z"}],"updatedAt":"2026-11-25T22:59:00.715Z","epss":{"score":0.00494,"percentile":0.44033,"date":"2026-12-01T12:00:22.000Z"}}