sqlparse

A non-validating SQL parser.

0.6.1Latest, 1 Nov 2026
13MDownloads, last month
0Advisories on the latest
17Advisories, all versions
non-standardLicence
4KStars
5.9/10OpenSSF Scorecard

Known advisories

Severity Advisory Fix Published
sqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumption CVE-2026-84305 Fixed in 0.6.0 10 Sep 2026
Moderate sqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumption CVE-2026-84305 Fixed in 0.6.0 1 Sep 2026
sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes CVE-2026-59894 Fixed in 0.6.0 19 Aug 2026
sqlparse: Quadratic O(n²) DoS in group_comments CVE-2026-71491 Fixed in 0.6.0 19 Aug 2026
sqlparse: Inefficient Regex Handling of Dollar-Quoted SQL Literals Leads to ReDoS (Denial of Service) CVE-2026-59893 Fixed in 0.6.0 19 Aug 2026
sqlparse: TokenList.__init__ materializes O(subtree) value per group, causing CPU DoS before depth/token caps trigger CVE-2026-54284 Fixed in 0.6.0 19 Aug 2026
Moderate sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes CVE-2026-59894 Fixed in 0.6.0 17 Aug 2026
High sqlparse: Quadratic O(n²) DoS in group_comments CVE-2026-71491 Fixed in 0.6.0 17 Aug 2026
High sqlparse: Inefficient Regex Handling of Dollar-Quoted SQL Literals Leads to ReDoS (Denial of Service) CVE-2026-59893 Fixed in 0.6.0 17 Aug 2026
High sqlparse: TokenList.__init__ materializes O(subtree) value per group, causing CPU DoS before depth/token caps trigger CVE-2026-54284 Fixed in 0.6.0 17 Aug 2026
sqlparse parsing heavily nested list leads to Denial of Service CVE-2024-4340 Fixed in 0.5.0 7 Jul 2026
Moderate sqlparse: formatting list of tuples leads to denial of service GHSA-27jp-wm6q-gp25 Fixed in 0.5.4 13 Feb 2026
High sqlparse parsing heavily nested list leads to Denial of Service CVE-2024-4340 Fixed in 0.5.0 15 Apr 2024
Moderate sqlparse contains a regular expression that is vulnerable to Regular Expression Denial of Service CVE-2023-30608 Fixed in 0.4.4 21 Apr 2023
PYSEC-2023-87 CVE-2023-30608 Fixed in 0.4.4 18 Apr 2023

Sources: PyPI, deps.dev (CC BY 4.0), OSV. Last checked 3 Dec 2026.