SecurityContext

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

  • Cve: CVE-2025-6638
  • 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 affecting the MarianTokenizer's `remove_language_code()` method. This vulnerability is present in version 4.52.4 and has been fixed in version 4.53.0. The issue arises from inefficient regex processing, which can be exploited by crafted input strings containing malformed language code patterns, leading to excessive CPU consumption and potential denial of service.
  • Impact: Attackers can cause excessive CPU consumption, leading to denial of service and application unavailability.
  • Remediation: Upgrade to version 4.53.0 or later.
  • Vulnerability type: misconfiguration
  • 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.00555
  • Epss percentile: 0.47184
  • Assignee: [email protected]
  • Published at: 2025-09-12T11:15:31Z
  • Age in days: 438
  • Modified at: 2026-06-17T10:02:17Z
  • 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-6638
  • 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/6a6c933f-9ce8-4ded-8b3b-2c1444c61f36nvd2025-09-12

References

UrlSourceTags
https://github.com/huggingface/transformers/commit/47c34fba5c303576560cb29767efb452ff12b8benvdPatch
https://huntr.com/bounties/6a6c933f-9ce8-4ded-8b3b-2c1444c61f36nvdExploit, Third Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
huggingface:transformers= 4.52.4nonvd/v1/products/huggingface/transformers

Projects

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

Index

  • Repositories: 2197
  • Repositories high signal: 1208
  • Packages: 1

Exploitation

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