Live threats

All CVEs / Huggingface

CVE-2025-5197Huggingface Transformers

Medium 5.3 No auth needed

Priority
47
CVSS 3.0
5.3
EPSS
—
Auth required
No
Published
Aug 6, 2025
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-1333
SSVC (CISA)
Exploitation: proof of concept · Automatable: yes · Technical impact: partial
Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Transformers.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI transformers < 4.53.0 4.53.0 pip install "transformers>=4.53.0"
PyPI transformers < 4.53.0 4.53.0 pip install "transformers>=4.53.0"

Per OSV / GitHub Advisories (GHSA-9356-575x-2w9m, PYSEC-2026-1983). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
huggingfacetransformers< 4.53.0

Official sources

References

Links published by the sources. Open them with care.