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.
Metrics
Affected Vendors & Products
References
History
Wed, 06 Aug 2025 13:15:00 +0000
Type | Values Removed | Values Added |
---|---|---|
Metrics |
ssvc
|
Wed, 06 Aug 2025 12:00:00 +0000
Type | Values Removed | Values Added |
---|---|---|
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. | |
Title | Regular Expression Denial of Service (ReDoS) in huggingface/transformers | |
Weaknesses | CWE-1333 | |
References |
| |
Metrics |
cvssV3_0
|

Status: PUBLISHED
Assigner: @huntr_ai
Published: 2025-08-06T11:53:37.232Z
Updated: 2025-08-06T13:03:10.518Z
Reserved: 2025-05-26T09:26:53.172Z
Link: CVE-2025-5197

Updated: 2025-08-06T13:02:37.359Z

Status : Received
Published: 2025-08-06T12:15:26.837
Modified: 2025-08-06T13:15:41.750
Link: CVE-2025-5197

No data.