Intel

AIKIDO-2026-962953

sqlparse is vulnerable to Denial of Service (DoS)

Denial of Service (DoS)CVE-2026-54284 Published 4 days ago

70

High Risk

This Affects:

PYTHONsqlparse
0.0.1 - 0.5.5
Fixed in 0.6.0
Are you affected? Scan for Free

TL;DR

sqlparse stores a string copy of each parsed group by processing every nested token, and it does this for every parenthesis, CASE expression, and list it wraps. Nested SQL therefore repeats that work at every level. A small payload of nested parentheses or CASE WHEN chains can stall a worker for several seconds before the existing depth and token caps abort, including on the default parse, format, and split paths. The fix concatenates each child's existing string instead of processing the whole tree.

Who does this affect?

You are affected if you use a version in the vulnerable range and pass untrusted or externally influenced SQL to sqlparse.parse, sqlparse.format or sqlparse.split.

Background info

sqlparse is vulnerable to Denial of Service (DoS) in versions 0.0.1 - 0.5.5.

How to fix this

Upgrade the sqlparse library to the patch version.