CVE-2026-54284 sqlparse: TokenList.__init__ materializes O(subtree) value per group, causing CPU DoS before depth/token caps trigger
Attackers can cause CPU exhaustion and denial of service in applications using sqlparse by submitting deeply nested SQL queries.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-54284?
CVE-2026-54284 is a high-severity denial of service vulnerability in andialbrecht sqlparse, published on 17 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
sqlparse is a non-validating SQL parser module for Python. Prior to 0.6.0, TokenList construction and string conversion in sqlparse/sql.py repeatedly flatten nested token subtrees constructed by group_parenthesis and group_case, causing quadratic CPU consumption through sqlparse.parse(), sqlparse.format(), and sqlparse.split() before depth and token limits terminate processing. This issue is fixed in version 0.6.0.
Which versions are affected by CVE-2026-54284?
3 open source packages ship an affected version, including sqlparse.
| Package | Affected | Fixed in |
|---|---|---|
sqlparse PyPI | All versions | 0.6.0 |
sqlparse PyPI | All versions | 0.6.0 |
sqlparse PyPI | All versions | 0.6.0 |
How do I fix CVE-2026-54284?
Upgrade sqlparse to 0.6.0 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-54284 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54284 exists.
Sources
Also known as CLEANSTART-2026-AA29461, CLEANSTART-2026-TN13603, CLEANSTART-2026-XN67293, DEBIAN-CVE-2026-54284, ECHO-5d2b-9e8c-bdec, GHSA-pwgv-4x5q-6m9f and 8 more.