1. Home
  2. Vulnerabilities
  3. CVE-2025-3264

CVE-2025-3264

A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in the Hugging Face Transformers…

Published 7 Jul 2025 · modified 17 Jun 2026 · Sources: NVD, CNA (vendor or assigner), CERT-FR, EPSS (FIRST)

Medium 41/100

Summary

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.

Affected products and versions

Huggingface (1 line(s))
Huggingface
ProductVersionsFixed inSource
Transformers from 4.49.0 (included) to 4.51.0 (excluded) — NVD

Fix

Not provided by the vendor.

Workaround

No workaround provided.

Check whether you are affected

Exploit reported by sources

These links are tagged “exploit” by the NVD or CVE.org. We have neither verified nor copied them; open with care.

Timeline

  1. — CVE published (cve)
  2. — CERT-FR advisory (certfr:CERTFR-2026-AVI-1486)

CERT-FR advisories

References

Data provenance

Status
NVD
Publication date
NVD
Description
NVD
CVSS score
CNA (vendor or assigner)
Weakness (CWE)
CNA (vendor or assigner)
CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L (CVSS 3.0, CNA:security@huntr.dev)
Weakness
CWE-1333 · Autre (CWE-1333)

How this data is obtained and calculated