MediumGHSA-27jp-wm6q-gp25
sqlparse: formatting list of tuples leads to denial of service
Published 13 Feb 2026 · Updated 10 Sept 2026
Is your project on an affected sqlparse?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
sqlparsePyPI
- Affected
- <0.5.4
- Fixed in
- 0.5.4
Update to the fixed version for your release line, for example:
pip install 'sqlparse>=0.5.4'Details
Summary
The below gist hangs while attempting to format a long list of tuples.
This was found while drafting a regression test for Dja ngo 5.2's composite primary key feature, which allows querying composite fields with tuples.
###
Is GHSA-27jp-wm6q-gp25 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected sqlparse, and gives you the command that fixes it.
More advisories for sqlparse
- MediumCVE-2026-84305sqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumption · 1 Sept 2026
- HighCVE-2026-59893sqlparse: Inefficient Regex Handling of Dollar-Quoted SQL Literals Leads to ReDoS (Denial of Service) · 17 Aug 2026
- HighCVE-2026-54284sqlparse: TokenList.__init__ materializes O(subtree) value per group, causing CPU DoS before depth/token caps trigger · 17 Aug 2026
- HighCVE-2026-71491sqlparse: Quadratic O(n²) DoS in group_comments · 17 Aug 2026
- MediumCVE-2026-59894sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes · 17 Aug 2026
- HighCVE-2024-4340sqlparse parsing heavily nested list leads to Denial of Service · 15 Apr 2024
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.