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.

Subscriptions

Vendors Products
Huggingface Subscribe
Transformers Subscribe

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
EUVD EUVD EUVD-2025-20217 Transformers vulnerable to ReDoS attack through its SETTING_RE variable
Github GHSA Github GHSA GHSA-489j-g2vx-39wf Transformers vulnerable to ReDoS attack through its SETTING_RE variable
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Sat, 02 Aug 2025 01:30:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:*
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}


Sun, 13 Jul 2025 13:45:00 +0000

Type Values Removed Values Added
Metrics epss

{'score': 0.00042}

epss

{'score': 0.00055}


Tue, 08 Jul 2025 00:30:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 07 Jul 2025 16:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 07 Jul 2025 10:00:00 +0000

Type Values Removed Values Added
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.
Title Regular Expression Denial of Service (ReDoS) in huggingface/transformers
Weaknesses CWE-1333
References
Metrics cvssV3_0

{'score': 5.3, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}


cve-icon MITRE

Status: PUBLISHED

Assigner: @huntr_ai

Published:

Updated: 2025-07-07T15:19:42.413Z

Reserved: 2025-04-04T12:40:28.677Z

Link: CVE-2025-3262

cve-icon Vulnrichment

Updated: 2025-07-07T15:19:29.051Z

cve-icon NVD

Status : Analyzed

Published: 2025-07-07T10:15:27.200

Modified: 2025-08-02T01:20:02.673

Link: CVE-2025-3262

cve-icon Redhat

Severity : Moderate

Publid Date: 2025-07-07T09:54:39Z

Links: CVE-2025-3262 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2025-07-13T21:47:26Z

Weaknesses