cbcvebase.
CVE-2025-5197
published 2025-08-06

CVE-2025-5197: A Regular Expression Denial of Service (ReDoS) vulnerability exists in the Hugging Face Transformers library, specifically in the…

PriorityP427medium5.3CVSS 3.0
AVNACLPRNUINSUCNINAL
EPSS
0.36%
27.9th percentile
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.

Affected

4 ranges
VendorProductVersion rangeFixed in
huggingfacehuggingface_transformers>= unspecified < 4.53.04.53.0
huggingfacetransformers< 4.53.04.53.0
huggingfacetransformers>= 0 < 4.53.04.53.0
msrccbl2_kernel_5.15.135.1-2_on_cbl_mariner_2.0

CVSS provenance

nvdv3.05.3MEDIUMCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
vendor_msrc6.6MEDIUM
vendor_redhat5.3MEDIUM
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.