SecurityContext

CVE-2025-3264: Hugging Face Transformers - Denial of Service

  • Cve: CVE-2025-3264
  • Name: Hugging Face Transformers - Denial of Service
  • Description: 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.
  • Impact: Attackers can cause resource exhaustion leading to denial of service and disruption of model serving or development pipelines.
  • Remediation: Upgrade to version 4.51.0 or later.
  • Vulnerability type: denial_of_service
  • Vulnerability impact: denial_of_service
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 5.3
  • Cvss vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
  • Epss score: 0.00496
  • Epss percentile: 0.4339
  • Assignee: [email protected]
  • Published at: 2025-07-07T10:15:27Z
  • Age in days: 505
  • Modified at: 2026-06-17T09:19:32Z
  • Patch available: yes
  • Public exploits total: 1
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2025-3264
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-1333Inefficient Regular Expression Complexity

Public exploits

UrlSourceAdded date
https://huntr.com/bounties/3c6f7822-9992-476d-8cf0-b0b1623427dfnvd2025-07-07

References

UrlSourceTags
https://github.com/huggingface/transformers/commit/0720e206c6ba28887e4d60ef60a6a089f6c1cc76nvdPatch
https://huntr.com/bounties/3c6f7822-9992-476d-8cf0-b0b1623427dfnvdExploit, Third Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
huggingface:transformers>= 4.49.0, < 4.51.0nonvd/v1/products/huggingface/transformers

Projects

RepositoryLink kindsIndexedUrl
huggingface/transformerscommit, packageyes/v1/repositories/huggingface/transformers

Index

  • Repositories: 2127
  • Repositories high signal: 1161
  • Packages: 1

Exploitation

  • Public exploit: yes
  • Public exploit count: 1
  • Public exploit first date: 2025-07-07
  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts