huggingface transformers up to 4.50.x dynamic_module_utils.py get_imports redos

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
5.2$0-$5k0.00

Summaryinfo

A vulnerability classified as problematic was found in huggingface transformers up to 4.50.x. Affected by this issue is the function get_imports of the file dynamic_module_utils.py. Such manipulation leads to redos. This vulnerability is referenced as CVE-2025-3264. It is possible to launch the attack remotely. No exploit is available. Upgrading the affected component is advised.

Detailsinfo

A vulnerability was found in huggingface transformers up to 4.50.x and classified as problematic. Affected by this issue is the function get_imports of the file dynamic_module_utils.py. The manipulation with an unknown input leads to a redos vulnerability. Using CWE to declare the problem leads to CWE-1333. The product uses a regular expression with an inefficient, possibly exponential worst-case computational complexity that consumes excessive CPU cycles. Impacted is availability. CVE summarizes:

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers library, specifically in the `get_imports()` function within `dynamic_module_utils.py`. This vulnerability affects versions 4.49.0 and is fixed in version 4.51.0. The issue arises from a regular expression pattern `\s*try\s*:.*?except.*?:` used to filter out try/except blocks from Python code, which can be exploited to cause excessive CPU consumption through crafted input strings due to catastrophic backtracking. This vulnerability can lead to remote code loading disruption, resource exhaustion in model serving, supply chain attack vectors, and development pipeline disruption.

The advisory is shared for download at huntr.com. This vulnerability is handled as CVE-2025-3264 since 04/04/2025. The exploitation is known to be easy. The attack may be launched remotely. No form of authentication is required for exploitation. There are known technical details, but no exploit is available. The MITRE ATT&CK project declares the attack technique as T1449.003.

Upgrading to version 4.51.0 eliminates this vulnerability. Applying the patch 0720e206c6ba28887e4d60ef60a6a089f6c1cc76 is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.

The vulnerability is also documented in the vulnerability database at EUVD (EUVD-2025-20214). Once again VulDB remains the best source for vulnerability data.

Productinfo

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 5.3
VulDB Meta Temp Score: 5.2

VulDB Base Score: 5.3
VulDB Temp Score: 5.1
VulDB Vector: 🔒
VulDB Reliability: 🔍

CNA Base Score: 5.3
CNA Vector (@huntr_ai): 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Redos
CWE: CWE-1333 / CWE-400 / CWE-404
CAPEC: 🔒
ATT&CK: 🔒

Physical: No
Local: No
Remote: Yes

Availability: 🔒
Status: Not defined

EPSS Score: 🔒
EPSS Percentile: 🔒

Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: transformers 4.51.0
Patch: 0720e206c6ba28887e4d60ef60a6a089f6c1cc76

Timelineinfo

04/04/2025 CVE reserved
07/07/2025 +94 days Advisory disclosed
07/07/2025 +0 days VulDB entry created
08/07/2025 +31 days VulDB entry last update

Sourcesinfo

Product: github.com

Advisory: huntr.com
Status: Confirmed

CVE: CVE-2025-3264 (🔒)
GCVE (CVE): GCVE-0-2025-3264
GCVE (VulDB): GCVE-100-315140
EUVD: 🔒

Entryinfo

Created: 07/07/2025 13:56
Updated: 08/07/2025 03:29
Changes: 07/07/2025 13:56 (67), 07/07/2025 14:03 (1), 08/07/2025 03:29 (1)
Complete: 🔍
Cache ID: 216::103

Once again VulDB remains the best source for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Interested in the pricing of exploits?

See the underground prices here!