Inefficient Algorithmic Complexity Affecting sqlparse package, versions [,0.6.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.18% (7th 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-PYTHON-SQLPARSE-19497929
  • published2 Sept 2026
  • disclosed1 Sept 2026
  • credit七号公园

Introduced: 1 Sep 2026

NewCVE-2026-84305  (opens in a new tab)
CWE-407  (opens in a new tab)

How to fix?

Upgrade sqlparse to version 0.6.0 or higher.

Overview

Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity via ReindentFilter._get_offset() in sqlparse/filters/reindent.py, which reconstructed the full statement prefix from the beginning of the statement on every call. Because _get_offset() is invoked once per group, reindenting a list of N parenthesized tuples or identifier lists with reindent=True incurs O(N²) CPU work. An attacker supplying a ~12 KB SQL payload containing a large tuple or identifier list can cause a worker process to stall for several seconds, resulting in a denial of service.

CVSS Base Scores

version 4.0
version 3.1