Regular Expression Denial of Service Vulnerability in Hugging Face Transformers Library
CVE-2025-3264

5.3MEDIUM

Key Information:

Vendor
CVE Published:
7 July 2025

What is CVE-2025-3264?

A Regular Expression Denial of Service (ReDoS) vulnerability in the Hugging Face Transformers library, particularly in the get_imports() function found in dynamic_module_utils.py, has been identified. It affects version 4.49.0 and allows attackers to exploit a flawed regular expression pattern used to filter Python try/except code blocks. The vulnerability can lead to excessive CPU consumption due to catastrophic backtracking, ultimately disrupting remote code loading processes, exhausting resources in model serving, and opening potential supply chain attack vectors.

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-3264 : Regular Expression Denial of Service Vulnerability in Hugging Face Transformers Library