Vulnerability in Huggingface Huggingface/transformers

CVE-2025-3262

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.

Vulnerability class: ReDoS (Regular Expression Denial of Service)

EPSS: 0.004 (35.3th percentile) — read the EPSS interpretation.

CVSS v3 metric

CVSS v3 base score 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.

Affected products

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2025-3262?
CVE-2025-3262 is a high-severity vulnerability in Huggingface Huggingface/transformers, classified under Inefficient Regular Expression Complexity. CVSS score: 7.5/10. Published 2025-07-07.
How severe is CVE-2025-3262?
High severity. CVSS v3 base score is 7.5 out of 10.