CVE-2025-3264: Transformers vulnerable to ReDoS attack through its get_imports() function
5.3
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.24608%
CWE
Published
7/7/2025
Updated
7/8/2025
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| transformers | pip | < 4.51.0 | 4.51.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability description explicitly points to the get_imports function in dynamic_module_utils.py as the source of the ReDoS vulnerability. The provided commit 126abe3461762e5fc180e7e614391d1b4ab051ca confirms this by showing the removal of the vulnerable regex-based implementation and its replacement with a safer AST-based approach. The patch evidence clearly shows the line with re.sub and the problematic regex that was removed, which is the root cause of the vulnerability. Therefore, I can confidently identify transformers.dynamic_module_utils.get_imports as the vulnerable function.