GHSA-27jp-wm6q-gp25 — Vulnerability in sqlparse — Advisory Details
sqlparse: formatting list of tuples leads to denial of service
Does your project use an affected sqlparse version?
Paste your requirements.txt to check it for GHSA-27jp-wm6q-gp25 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
Advisory Timeline
- First published February 13, 2026 (286 days ago).
- Last revised September 10, 2026 — 208 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip install "sqlparse>=0.5.4"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: PyPI (1).
| Package | Fixed In |
|---|---|
| sqlparse PyPI · Affected: 0.1.0, 0.1.1, 0.1.10, 0.1.11 (+32 more) | 0.5.4 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-770Allocation of Resources Without LimitsMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
References
Frequently Asked Questions
- What is GHSA-27jp-wm6q-gp25?
- sqlparse: formatting list of tuples leads to denial of service. This vulnerability has been assigned a severity rating of MEDIUM.
- How do I check if my project is affected by GHSA-27jp-wm6q-gp25?
- GHSA-27jp-wm6q-gp25 affects sqlparse. Use GeekWala's free vulnerability scanner to check your dependencies against GHSA-27jp-wm6q-gp25 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Related CVEs
- CVE-2024-4340HIGH
sqlparse parsing heavily nested list leads to Denial of Service
- CVE-2026-59894HIGH
sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes
- CVE-2024-4340HIGH
sqlparse parsing heavily nested list leads to Denial of Service
- CVE-2026-71491HIGH
sqlparse: Quadratic O(n²) DoS in group_comments
- CVE-2026-59893HIGH
sqlparse: Inefficient Regex Handling of Dollar-Quoted SQL Literals Leads to ReDoS (Denial of Service)
- CVE-2026-54284HIGH
sqlparse: TokenList.__init__ materializes O(subtree) value per group, causing CPU DoS before depth/token caps trigger
- CVE-2026-59894MEDIUM
sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes
- CVE-2026-84305MEDIUM
sqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumption