GHSA-27jp-wm6q-gp25: sqlparse: formatting list of tuples leads to denial of service
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.
Published Feb 13, 2026
Affected packages
sqlparse
- Ecosystem
- PyPI
- Affected
- <= 0.5.3
- Fixed in
- 0.5.4
- Check
pip show sqlparse
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
###
Credited to jacobtylerwalls.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-84305
sqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumption
medium5.1Sep 1, 2026CVE-2026-54284
sqlparse: TokenList.__init__ materializes O(subtree) value per group, causing CPU DoS before depth/token caps trigger
high8.7Aug 17, 2026CVE-2026-59893
sqlparse: Inefficient Regex Handling of Dollar-Quoted SQL Literals Leads to ReDoS (Denial of Service)
high7.5Aug 17, 2026CVE-2026-59894
sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes
medium6.2Aug 17, 2026CVE-2026-71491
sqlparse: Quadratic O(n²) DoS in group_comments
high8.7Aug 17, 2026CVE-2024-4340
sqlparse parsing heavily nested list leads to Denial of Service
high7.5Apr 15, 2024
