Inefficient Regular Expression Complexity Affecting nemo package, versions <2.4.0-r5


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.06% (20th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Inefficient Regular Expression Complexity vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-CHAINGUARDLATEST-NEMO-11540153
  • published9 Aug 2025
  • disclosed6 Aug 2025

Introduced: 6 Aug 2025

CVE-2025-5197  (opens in a new tab)
CWE-1333  (opens in a new tab)

How to fix?

Upgrade Chainguard nemo to version 2.4.0-r5 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream nemo package and not the nemo package as distributed by Chainguard. See How to fix? for Chainguard relevant fixed versions and status.

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.