SB2026021756 - Inefficient regular expression complexity in Hugging Face Transformers library
Published: February 17, 2026
Breakdown by Severity
- Low
- Medium
- High
- Critical
Description
This security bulletin contains information about 1 security vulnerability.
1) Inefficient regular expression complexity (CVE-ID: CVE-2025-5197)
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
Install update from vendor's website.