Inefficient Regular Expression Complexity Affecting py3-knack package, versions <0.12.0-r3


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.41% (38th 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 IDSNYK-CHAINGUARDLATEST-PY3KNACK-12253052
  • published30 Aug 2025
  • disclosed20 Aug 2025

Introduced: 20 Aug 2025

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

How to fix?

Upgrade Chainguard py3-knack to version 0.12.0-r3 or higher.

NVD Description

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

Microsoft Knack 0.12.0 allows Regular expression Denial of Service (ReDoS) in the knack.introspection module. option_descriptions employs an inefficient regular expression pattern: "\s(:param)\s+(.+?)\s:(.*)" that is susceptible to catastrophic backtracking when processing crafted docstrings containing a large volume of whitespace without a terminating colon. An attacker who can control or inject docstring content into affected applications can trigger excessive CPU consumption. This software is used by Azure CLI.