#VU122991 Inefficient regular expression complexity in transformers - CVE-2025-5197

 

#VU122991 Inefficient regular expression complexity in transformers - CVE-2025-5197

Published: February 17, 2026


Vulnerability identifier: #VU122991
Vulnerability risk: Medium
CVSSv4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2025-5197
CWE-ID: CWE-1333
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vulnerable software:
transformers
Software vendor:
huggingface

Description

The vulnerability allows a remote attacker to perform a denial of service (DoS) attack.

The vulnerability exists due to `convert_tf_weight_name_to_pt_weight_name()` 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. A remote attacker can pass specially crafted data to the application and perform regular expression denial of service (ReDos) attack.


Remediation

Cybersecurity Help is currently unaware of any official solution to address this vulnerability..

External links