# CVE-2025-3262: Regular Expression Denial of Service (ReDoS) in huggingface/transformers

- Severity: Medium 5.3 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.49%, higher than 44% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-07-07T09:54:39.079Z
- Modified: 2026-07-07T17:56:54.298Z
- Also known as: GHSA-489j-g2vx-39wf, PYSEC-2026-1979
- Weaknesses: CWE-1333
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: @huntr_ai

## Description

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.

(As written by CVE List.)

## Affected

- huggingface huggingface/transformers: from unspecified before 4.51.0
- transformers (PyPI): from 4.49.0 before 4.51.0
- huggingface transformers: before 4.51.0

## Every score

- @huntr_ai: CVSS:3.0 5.3 Medium `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- PyPA Advisory Database: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`

## References

- <https://huntr.com/bounties/ecf5ccc4-39e7-4fb3-b547-14a41d31a184> (exploit, third-party-advisory, web)
- <https://github.com/huggingface/transformers/commit/0720e206c6ba28887e4d60ef60a6a089f6c1cc76> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-3262> (advisory)
- <https://github.com/huggingface/transformers/commit/126abe3461762e5fc180e7e614391d1b4ab051ca> (web)
- <https://github.com/huggingface/transformers> (package)
- <https://pypi.org/project/transformers> (package)
- <https://github.com/advisories/GHSA-489j-g2vx-39wf> (advisory)

## Sources

- CVE List: [CVE-2025-3262](https://www.cve.org/CVERecord?id=CVE-2025-3262), CVE Terms of Use, modified 2025-07-07
- GitHub Advisory Database: [GHSA-489j-g2vx-39wf](https://github.com/advisories/GHSA-489j-g2vx-39wf), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2025-3262](https://nvd.nist.gov/vuln/detail/CVE-2025-3262), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1979](https://osv.dev/vulnerability/PYSEC-2026-1979), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2025-3262 · Whole record: https://cve.day/CVE-2025-3262.json · Rebuilt by cve.day 2026-11-25T22:59:00.715Z
