# sqlparse (PyPI)

A non-validating SQL parser.

- Latest: 0.6.1 (2026-11-01)
- Licence: non-standard
- Downloads: 129565624 last month
- Advisories on the latest version: 0

- CVE-2026-84305 : sqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumption Fixed in 0.6.0.
- CVE-2026-84305 MODERATE: sqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumption Fixed in 0.6.0.
- CVE-2026-59894 : sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes Fixed in 0.6.0.
- CVE-2026-71491 : sqlparse: Quadratic O(n²) DoS in group_comments Fixed in 0.6.0.
- CVE-2026-59893 : sqlparse: Inefficient Regex Handling of Dollar-Quoted SQL Literals Leads to ReDoS (Denial of Service) Fixed in 0.6.0.
- CVE-2026-54284 : sqlparse: TokenList.__init__ materializes O(subtree) value per group, causing CPU DoS before depth/token caps trigger Fixed in 0.6.0.
- CVE-2026-59894 MODERATE: sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes Fixed in 0.6.0.
- CVE-2026-71491 HIGH: sqlparse: Quadratic O(n²) DoS in group_comments Fixed in 0.6.0.
- CVE-2026-59893 HIGH: sqlparse: Inefficient Regex Handling of Dollar-Quoted SQL Literals Leads to ReDoS (Denial of Service) Fixed in 0.6.0.
- CVE-2026-54284 HIGH: sqlparse: TokenList.__init__ materializes O(subtree) value per group, causing CPU DoS before depth/token caps trigger Fixed in 0.6.0.
- CVE-2024-4340 : sqlparse parsing heavily nested list leads to Denial of Service Fixed in 0.5.0.
- GHSA-27jp-wm6q-gp25 MODERATE: sqlparse: formatting list of tuples leads to denial of service Fixed in 0.5.4.
- CVE-2024-4340 HIGH: sqlparse parsing heavily nested list leads to Denial of Service Fixed in 0.5.0.
- CVE-2023-30608 MODERATE: sqlparse contains a regular expression that is vulnerable to Regular Expression Denial of Service Fixed in 0.4.4.
- CVE-2023-30608 :  Fixed in 0.4.4.
- CVE-2021-32839 :  Fixed in 0.4.2.
- CVE-2021-32839 HIGH: StripComments filter contains a regular expression that is vulnerable to ReDOS (Regular Expression Denial of Service) Fixed in 0.4.2.

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