Skip to main content
EPSS 0.3%top 76%

CVE-2026-54284: CWE-407: Inefficient Algorithmic Complexity in andialbrecht sqlparse

0
High
Published: 08/19/2026 (08/19/2026, 00:00:00 UTC)
Source: CVE Database V5
Vendor/Project: andialbrecht
Product: 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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Affected software

andialbrecht

sqlparse

Affected versions
<0.6.0
sqlparse
pkg:pypi/sqlparse
Affected versions
<0.6.0

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

AILast updated: 09/17/2026, 02:52:34 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses