ADVISORIES

Ubuntu CVE Tracker

UBUNTU-CVE-2026-59893

Details

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.

Affected packages

EcosystemPackageAffected versions
Ubuntu:Pro:18.04:LTSsqlparse
All versions before 0.2.4-0.1ubuntu0.1+esm1 (fixed in 0.2.4-0.1ubuntu0.1+esm1)
Ubuntu:Pro:20.04:LTSsqlparse
All versions before 0.2.4-3ubuntu0.1+esm1 (fixed in 0.2.4-3ubuntu0.1+esm1)
Ubuntu:22.04:LTSsqlparse
All versions before 0.4.2-1ubuntu0.22.04.3 (fixed in 0.4.2-1ubuntu0.22.04.3)
Ubuntu:24.04:LTSsqlparse
All versions before 0.4.4-1ubuntu0.2 (fixed in 0.4.4-1ubuntu0.2)
Ubuntu:26.04:LTSsqlparse
All versions before 0.5.4-1ubuntu0.1 (fixed in 0.5.4-1ubuntu0.1)

References