cve.bz

CVE-2025-6638 huggingface transformers

7.5 highExploit referenceEPSS 0.6%Fix available

High (7.5) in huggingface transformers. EPSS 0.6% estimated probability of exploitation activity in the next 30 days. Fixed in transformers 4.53.0.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
0.6% (unchanged from 0.6% a week ago; 0.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 47th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: partial, assessed 2025-09-12. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-1333 Inefficient Regular Expression Complexity
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-6638 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-6638?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-6638?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-6638 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
huggingface/transformersbefore 4.53.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-59p9-h35m-wg4gPyPItransformers<4.53.04.53.0
PYSEC-2026-1981PyPItransformers<4.53.04.53.0

Red Hat

Red Hat rates this Moderate.

Red Hat's mitigation

Mitigation 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.

ProductPackageStateAdvisory
OpenShift Lightspeedopenshift-lightspeed/lightspeed-ocp-rag-rhel9Affected
OpenShift Lightspeedopenshift-lightspeed/lightspeed-service-api-rhel9Affected
OpenShift Lightspeedopenshift-lightspeed-tech-preview/lightspeed-rag-tool-rhel9Affected
Red Hat AI Inference Serverrhaiis/model-opt-cuda-rhel9Affected
Red Hat AI Inference Serverrhaiis-preview/vllm-cuda-rhel9Affected
Red Hat AI Inference Serverrhaiis/vllm-cuda-rhel9Affected
Red Hat AI Inference Serverrhaiis/vllm-rocm-rhel9Affected
Red Hat AI Inference Serverrhaiis/vllm-spyre-rhel9Affected
Red Hat AI Inference Serverrhaiis/vllm-tpu-rhel9Affected
Red Hat Ansible Automation Platform 2aap-cloud-metrics-collector-containerAffected
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/de-minimal-rhel8Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/ee-minimal-rhel9Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/ansible-dev-tools-rhel8Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/de-supported-rhel8Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/ee-cloud-services-rhel9Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/ee-supported-rhel9Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/lightspeed-chatbot-rhel8Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/lightspeed-chatbot-rhel9Affected
Red Hat Ansible Automation Platform 2ansible-devspaces-containerAffected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-amd-rhel9Affected
42 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-6638.

Attack patterns (CAPEC)

  • CAPEC-492 Regular Expression Exponential Blowup

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON