CVE-2025-3264 – transformers
Package
Manager: pip
Name: transformers
Vulnerable Version: >=0 <4.51.0
Severity
Level: Medium
CVSS v3.1: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
EPSS: 0.00077 pctl0.23711
Details
Transformers vulnerable to ReDoS attack through its get_imports() function 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.
Metadata
Created: 2025-07-07T12:30:22Z
Modified: 2025-07-08T16:38:04Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/07/GHSA-jjph-296x-mrcr/GHSA-jjph-296x-mrcr.json
CWE IDs: ["CWE-1333"]
Alternative ID: GHSA-jjph-296x-mrcr
Finding: F211
Auto approve: 1