Denial of Service Vulnerability in Hugging Face Transformers Library
CVE-2025-3262

5.3MEDIUM

Key Information:

Vendor
CVE Published:
7 July 2025

What is CVE-2025-3262?

A Denial of Service vulnerability has been identified in the Hugging Face Transformers library, specifically in version 4.49.0. The root cause lies in the inefficient regular expression patterns defined in the SETTING_RE variable located in the transformers/commands/chat.py file. This issue arises due to the presence of repetition groups and poorly optimized quantifiers, which can lead to severe performance degradation through exponential backtracking when processing 'almost matching' payloads. Maliciously crafted input strings can exploit this vulnerability, resulting in a Denial-of-Service condition. This issue has been addressed in version 4.51.0.

Affected Version(s)

huggingface/transformers < 4.51.0

References

CVSS V3.0

Score:
5.3
Severity:
MEDIUM
Confidentiality:
None
Integrity:
None
Availability:
None
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.
CVE-2025-3262 : Denial of Service Vulnerability in Hugging Face Transformers Library