CVE-2026-54284: sqlparse: TokenList.__init__ materializes O(subtree) value per group, causing CPU DoS before depth/token caps trigger

Published Aug 17, 2026
·
Updated

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 groupparenthesis and groupcase, 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.

Affected Software

1 affected component
pypi/sqlparse<0.6.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade sqlparse to a version that resolves this vulnerability.

    Fixed in 0.6.0

Event History

Aug 17, 2026
CVE Published
via MITRE·05:43 PM
Data Sourced
via MITRE·05:43 PM
DescriptionWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-54284?

CVE-2026-54284 has a risk score of 37, indicating a moderate potential for exploitation.

2

How do I fix CVE-2026-54284?

To fix CVE-2026-54284, update sqlparse to version 0.6.0 or higher.

3

What does CVE-2026-54284 affect?

CVE-2026-54284 affects the sqlparse module used for parsing SQL in Python applications.

4

What kind of attack can CVE-2026-54284 lead to?

CVE-2026-54284 can lead to a CPU Denial of Service (DoS) due to excessive CPU consumption.

5

When was CVE-2026-54284 published?

CVE-2026-54284 was published on August 17, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203