CVE-2025-6638
A public proof of concept exists; no exploitation attested.
- Published2025-09-12
- Fixed in4.53.0
- WeaknessCWE-1333
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2025-09-1211:15CVE publishedNVD
Versions per branch
OSV · NVD| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 4.53 | < 4.53.0 | 4.53.0 | OSV |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 4.52 | = 4.52.4 | no fix published | NVD |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Products declared by the CNA1 product
As @huntr_ai, the CNA that assigned this CVE, declared them in the CVE record; versions as written.
- huggingface/transformersAffected
- < 4.53.0fixed in 4.53.0custom
Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2025-09-12
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- py3.10-transformers-4.51Chainguardall versions · no fixed version listedand 3 other packages
- text-generation-inferenceChainguardall versions · fixed in 3.3.7-r8
- text-generation-inferenceChainguardall versions · fixed in 3.3.7-r9
Vendor advisories
transformers: Regular Expression Denial of Service (ReDoS) in huggingface/transformers
openshift-lightspeed-tech-preview/lightspeed-rag-tool-rhel9 as a component of OpenShift Lightspeed · openshift-lightspeed/lightspeed-ocp-rag-rhel9 as a component of OpenShift Lightspeed · openshift-lightspeed/lightspeed-service-api-rhel9 as a component of OpenShift Lightspeed · +59 more
Fix
- Update transformers to 4.53.0
- Workaround from the vendor Red Hat Product Security CVE-2025-6638 · 62 productsMitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
- No fix available, says the vendor Red Hat Product Security CVE-2025-6638 · 62 productsAffected
Advisories and patches
- github.comPatch
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- CISA-ADP (SSVC)PoC stated2025-09-12
- PoC-in-GitHubno public repository identifiedread 2026-11-19
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionpoc2025-09-12
- NVDCVSS 3.17.5read 2026-10-23
- CNACVSS 3.05.3known since 2026-10-23
- CNAweakness (CWE)CWE-1333known since 2026-10-23
- FIRST EPSSEPSS score0.6 %2026-11-18
- OSVaffected packages—
- GitHub AdvisoriesadvisoryMODERATE2025-09-15
Identifiers
- CGA-37j3-gj73-3759same flawChainguard · CC-BY-NC-ND-4.0
- CGA-5cxh-jvp3-rh3msame flawChainguard · CC-BY-NC-ND-4.0
- CGA-6j37-6qm3-fp3rsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-6xcx-m94h-mg44same flawChainguard · CC-BY-NC-ND-4.0
- CGA-7678-pcvp-22hpsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-8hq6-gxgw-q784same flawChainguard · CC-BY-NC-ND-4.0
- CGA-fhxw-fp9m-28f4same flawChainguard · CC-BY-NC-ND-4.0
- CGA-g2pw-26cq-67gvsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-m8jh-fx5q-72xcsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-wfw6-xqjp-279vsame flawChainguard · CC-BY-NC-ND-4.0
- EUVD-2025-29032same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-59p9-h35m-wg4gsame flawGitHub Advisory Database · CC-BY-4.0
- PYSEC-2026-1981same flawPyPA Advisory Database · CC-BY-4.0
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Published
- 2025-09-12
- Last Modified
- 2026-06-17
- NVD status
- Analyzed
- GitHub Advisory
- GHSA-59p9-h35m-wg4g
Frequently asked questions
What is CVE-2025-6638?
Is CVE-2025-6638 actively exploited?
What is the CVSS score for CVE-2025-6638?
Running transformers? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-59p9-h35m-wg4g
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- CISA Vulnrichment · CC0-1.0