CVE-2025-6638Huggingface Transformers
High 7.5 No auth needed
Follow: this CVE · Huggingface · Huggingface Transformers We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- —
- Auth required
- No
- Published
- Sep 12, 2025
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-1333
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
What happens
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.
What to do
- Apply the vendor's security update for Transformers.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | transformers |
< 4.53.0 |
4.53.0 |
pip install "transformers>=4.53.0" |
| PyPI | transformers |
< 4.53.0 |
4.53.0 |
pip install "transformers>=4.53.0" |
Per OSV / GitHub Advisories (GHSA-59p9-h35m-wg4g, PYSEC-2026-1981). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| huggingface | transformers | 4.52.4 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- huntr.com Exploit Third Party Advisory