CVE catalog

CVE-2025-5197

Hugging Face Transformers Regular Expression Denial of Service (ReDoS) vulnerability

[CVE catalog]

Severity
Medium · CVSS 5.3CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Published
Source
[NVD] · [CVE record]
EPSS
0.40% · Oct 25, 2026

A flaw was found in transformers. The `convert_tf_weight_name_to_pt_weight_name()` function contains a Regular Expression Denial of Service (ReDoS) vulnerability, where a maliciously crafted input string can cause excessive backtracking during regular expression matching. This flaw allows a network-based attacker to trigger this condition by providing a specially designed string as input. This results in a denial of service due to resource exhaustion. transformers: Transformers ReDoS Vulnerability The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
PyPItransformersNot reported4.53.0fixed
PyPItransformersNot reported4.53.0fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
PyPItransformersPyPINot reported4.53.0Not reportedPYSEC-2026-1983Not reported
PyPItransformersPyPINot reported4.53.0Not reportedGHSA-9356-575X-2W9MNot reported

OpenFactory catalog packages

No matching packages in this catalog.

Observed:

References