CVE-2025-6638: huggingface/transformers · ReDoS
Affects huggingface/transformersSource CVE Database V5
Not known to be exploited · CVSS 5.3 Medium : upgrade to 4.53.0 when convenient.
Data as of 26 Oct 2026, 06:26 UTC
- EPSS
- 0.5% chance of exploitation in 30 days – higher than 46% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 4.53.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LExploitation evidence
Disclosed: evidence found.
CVE published 12 Sep 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.
What to do
Upgrade huggingface/transformers to 4.53.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| huggingface huggingface/transformers | Affected
| Fixed in
|
AI-suggested
European organizations should upgrade the Hugging Face Transformers library to version 4.53.0 or later, where the vulnerability has been fixed. If immediate upgrading is not feasible, organizations should implement input validation and sanitization to detect and reject malformed or suspicious language code patterns before they reach the vulnerable tokenizer method. Rate limiting and anomaly detection on text input endpoints can help mitigate the risk of exploitation by limiting the volume of potentially malicious inputs. Additionally, monitoring CPU usage and application performance metrics can provide early warning signs of attempted ReDoS attacks. For critical systems, consider isolating NLP processing components behind dedicated services with resource constraints (e.g., CPU quotas, timeouts) to prevent cascading failures. Security teams should also review deployment architectures to ensure that untrusted user inputs are not directly processed by vulnerable components without proper filtering. Finally, maintain awareness of updates from Hugging Face and related security advisories to promptly apply patches.
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.