Inefficient Regular Expression Complexity Affecting sqlparse package, versions <0.2.4-3ubuntu0.1+esm1


Severity

Recommended
medium

Based on Ubuntu security rating.

Threat Intelligence

EPSS
0.34% (25th 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-UBUNTU2004-SQLPARSE-18913012
  • published22 Sept 2026
  • disclosed17 Aug 2026

Introduced: 17 Aug 2026

CVE-2026-59893  (opens in a new tab)
CWE-1333  (opens in a new tab)

How to fix?

Upgrade Ubuntu:20.04 sqlparse to version 0.2.4-3ubuntu0.1+esm1 or higher.

NVD Description

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

sqlparse is a non-validating SQL parser module for Python. Prior to 0.6.0, SQL_REGEX in sqlparse/keywords.py and the per-position loop in sqlparse/lexer.py repeatedly scan unmatched dollar-quoted literal and multiline-comment delimiters, causing quadratic CPU consumption through sqlparse.parse(), sqlparse.format(), and sqlparse.split(). This issue is fixed in version 0.6.0.

CVSS Base Scores

version 3.1