Live threats

All CVEs / Huggingface

CVE-2025-3264Huggingface Transformers

Medium 5.3 No auth needed

Priority
47
CVSS 3.0
5.3
EPSS
—
Auth required
No
Published
Jul 7, 2025
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-1333
SSVC (CISA)
Exploitation: proof of concept · Automatable: yes · Technical impact: partial
Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Transformers.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI transformers < 4.51.0 4.51.0 pip install "transformers>=4.51.0"
PyPI transformers < 4.51.0 4.51.0 pip install "transformers>=4.51.0"

Per OSV / GitHub Advisories (GHSA-jjph-296x-mrcr, PYSEC-2026-1985). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
huggingfacetransformers≥ 4.49.0 < 4.51.0

Official sources

References

Links published by the sources. Open them with care.