{"cve":"CVE-2025-5197","nvd":{"published":"2025-08-06T12:15:26.837","modified":"2026-06-17T09:47:25.920","status":"Analyzed","description":"A Regular Expression Denial of Service (ReDoS) vulnerability exists in the Hugging Face Transformers library, specifically in the `convert_tf_weight_name_to_pt_weight_name()` function. This function, responsible for converting TensorFlow weight names to PyTorch format, uses a regex pattern `/[^/]*___([^/]*)/` that can be exploited to cause excessive CPU consumption through crafted input strings due to catastrophic backtracking. The vulnerability affects versions up to 4.51.3 and is fixed in version 4.53.0. This issue can lead to service disruption, resource exhaustion, and potential API service vulnerabilities, impacting model conversion processes between TensorFlow and PyTorch formats.","cvss_v4":null,"cvss_v3":{"version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3},"cwes":["CWE-1333"],"references":["https://github.com/huggingface/transformers/commit/944b56000be5e9b61af8301aa340838770ad8a0b","https://huntr.com/bounties/3f8b3fd0-166b-46e7-b60f-60dd9d2678bf","https://huntr.com/bounties/3f8b3fd0-166b-46e7-b60f-60dd9d2678bf"],"products":["huggingface:transformers"],"source":"nvd","synced_at":"2026-10-19T22:06:45.861874017+00:00"},"epss":{"cve":"CVE-2025-5197","score":0.00419,"percentile":0.36251,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-9356-575x-2w9m","url":"https://osv.dev/vulnerability/GHSA-9356-575x-2w9m","summary":"Hugging Face Transformers Regular Expression Denial of Service (ReDoS) vulnerability","modified":"2026-09-10T03:50:26.988216861Z","packages":[{"ecosystem":"PyPI","name":"transformers","purl":"pkg:pypi/transformers","ranges":["<4.53.0"],"fixed":["4.53.0"]}]},{"id":"PYSEC-2026-1983","url":"https://osv.dev/vulnerability/PYSEC-2026-1983","summary":"Hugging Face Transformers Regular Expression Denial of Service (ReDoS) vulnerability","modified":"2026-07-07T17:48:14.063256721Z","packages":[{"ecosystem":"PyPI","name":"transformers","purl":"pkg:pypi/transformers","ranges":["<4.53.0"],"fixed":["4.53.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}