SecurityContext

CVE-2025-2099: huggingface/transformers - Denial of Service

  • Cve: CVE-2025-2099
  • Name: huggingface/transformers - Denial of Service
  • Description: A vulnerability in the `preprocess_string()` function of the `transformers.testing_utils` module in huggingface/transformers version v4.48.3 allows for a Regular Expression Denial of Service (ReDoS) attack. The regular expression used to process code blocks in docstrings contains nested quantifiers, leading to exponential backtracking when processing input with a large number of newline characters. An attacker can exploit this by providing a specially crafted payload, causing high CPU usage and potential application downtime, effectively resulting in a Denial of Service (DoS) scenario.
  • Impact: Attackers can cause high CPU usage and application downtime, resulting in denial of service.
  • Remediation: Update to the latest version of huggingface/transformers.
  • Vulnerability type: denial_of_service
  • Vulnerability impact: denial_of_service
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 7.5
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Epss score: 0.00613
  • Epss percentile: 0.50306
  • Assignee: [email protected]
  • Published at: 2025-05-19T12:15:19Z
  • Age in days: 554
  • Modified at: 2026-06-17T09:06:19Z
  • 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-2099
  • 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/97b780f3-ffca-424f-ad5d-0e1c57a5bde4nvd2025-05-19

References

UrlSourceTags
https://github.com/huggingface/transformers/commit/8cb522b4190bd556ce51be04942720650b1a3e57nvdPatch
https://huntr.com/bounties/97b780f3-ffca-424f-ad5d-0e1c57a5bde4nvdExploit, Third Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
huggingface:transformers<= 4.48.3nonvd/v1/products/huggingface/transformers

Projects

RepositoryLink kindsIndexedUrl
huggingface/transformerscommit, package, pullyes/v1/repositories/huggingface/transformers

Index

  • Repositories: 2110
  • Repositories high signal: 1148
  • Packages: 1

Exploitation

  • Public exploit: yes
  • Public exploit count: 1
  • Public exploit first date: 2025-05-19
  • 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