CVE-2025-6638

Source
https://cve.org/CVERecord?id=CVE-2025-6638
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-6638.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-6638
Aliases
Related
Published
2025-09-12T10:46:07.934Z
Modified
2026-07-08T08:12:20.291678742Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L CVSS Calculator
Summary
Regular Expression Denial of Service (ReDoS) in huggingface/transformers
Details

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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/6xxx/CVE-2025-6638.json",
    "cwe_ids": [
        "CWE-1333"
    ],
    "cna_assigner": "@huntr_ai"
}
References

Affected packages

Git / github.com/huggingface/transformers

Affected ranges

Type
GIT
Repo
https://github.com/huggingface/transformers
Events
Database specific
{
    "source": [
        "CPE_STRING",
        "REFERENCES"
    ],
    "cpe": "cpe:2.3:a:huggingface:transformers:4.52.4:*:*:*:*:*:*:*",
    "extracted_events": [
        {
            "introduced": "4.52.4"
        },
        {
            "last_affected": "4.52.4"
        }
    ]
}

Affected versions

4.*
4.52.4

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-6638.json"