CVE-2026-54284: CWE-407: Inefficient Algorithmic Complexity in andialbrecht sqlparse
CVE-2026-54284 is a high-severity vulnerability in the Python sqlparse module prior to version 0.6.0. The issue arises from inefficient algorithmic complexity during TokenList construction and string conversion, causing quadratic CPU consumption when using sqlparse.parse(), sqlparse.format(), and sqlparse.split(). This inefficiency is due to repeatedly flattening nested token subtrees. The vulnerability is fixed in sqlparse version 0.6.0.
AI Analysis
Technical Summary
The sqlparse Python module versions before 0.6.0 suffer from an inefficient algorithmic complexity vulnerability (CWE-407). Specifically, the construction of TokenList and string conversion in sqlparse/sql.py repeatedly flatten nested token subtrees created by group_parenthesis and group_case functions. This results in quadratic CPU consumption during the execution of sqlparse.parse(), sqlparse.format(), and sqlparse.split() functions. The processing is eventually terminated by depth and token limits, but the inefficiency can cause significant resource exhaustion. The vulnerability is addressed and fixed in version 0.6.0 of sqlparse.
Potential Impact
This vulnerability can lead to high CPU consumption when processing certain SQL inputs with affected versions of sqlparse, potentially causing denial of service due to resource exhaustion. There is no indication of privilege escalation, data leakage, or remote code execution. The impact is limited to performance degradation and possible service disruption.
Mitigation Recommendations
Upgrade to sqlparse version 0.6.0 or later, where this inefficient algorithmic complexity issue has been fixed. No other mitigation is required as the fix is officially available.
CVE-2026-54284: CWE-407: Inefficient Algorithmic Complexity in andialbrecht sqlparse
Description
CVE-2026-54284 is a high-severity vulnerability in the Python sqlparse module prior to version 0.6.0. The issue arises from inefficient algorithmic complexity during TokenList construction and string conversion, causing quadratic CPU consumption when using sqlparse.parse(), sqlparse.format(), and sqlparse.split(). This inefficiency is due to repeatedly flattening nested token subtrees. The vulnerability is fixed in sqlparse version 0.6.0.
CVSS v4.0
Score 8.7high
Affected software
andialbrecht
sqlparse
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The sqlparse Python module versions before 0.6.0 suffer from an inefficient algorithmic complexity vulnerability (CWE-407). Specifically, the construction of TokenList and string conversion in sqlparse/sql.py repeatedly flatten nested token subtrees created by group_parenthesis and group_case functions. This results in quadratic CPU consumption during the execution of sqlparse.parse(), sqlparse.format(), and sqlparse.split() functions. The processing is eventually terminated by depth and token limits, but the inefficiency can cause significant resource exhaustion. The vulnerability is addressed and fixed in version 0.6.0 of sqlparse.
Potential Impact
This vulnerability can lead to high CPU consumption when processing certain SQL inputs with affected versions of sqlparse, potentially causing denial of service due to resource exhaustion. There is no indication of privilege escalation, data leakage, or remote code execution. The impact is limited to performance degradation and possible service disruption.
Mitigation Recommendations
Upgrade to sqlparse version 0.6.0 or later, where this inefficient algorithmic complexity issue has been fixed. No other mitigation is required as the fix is officially available.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-12T17:46:37.292Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a834becbf8831d5394ecf7e
Added to database: 08/17/2026, 17:59:08 UTC
Last enriched: 09/17/2026, 02:52:34 UTC
Last updated: 10/01/2026, 14:52:58 UTC
Views: 72
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.