PT-2025-28152 · Hugging Face · Huggingface/Transformers

Published

2025-03-17

·

Updated

2025-08-07

·

CVE-2025-3264

CVSS v3.1

5.3

Medium

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Name of the Vulnerable Software and Affected Versions: Hugging Face Transformers versions 4.49.0 through 4.50.0
Description: A Regular Expression Denial of Service (ReDoS) vulnerability exists in the Hugging Face Transformers library, specifically within the get imports() function of dynamic module utils.py. The issue stems from a regular expression pattern s*trys*:.*?except.*?: used to filter try/except blocks from Python code. This pattern is susceptible to catastrophic backtracking, allowing crafted input strings to cause excessive CPU consumption. This can lead to remote code loading disruption, resource exhaustion in model serving, supply chain attack vectors, and development pipeline disruption.
Recommendations: Update to version 4.51.0 or later to resolve this issue.

Exploit

Fix

DoS

Weakness Enumeration

Related Identifiers

BDU:2026-03547
CVE-2025-3264
GHSA-JJPH-296X-MRCR

Affected Products

Huggingface/Transformers