# sqlparse (PyPI) vulnerabilities

8 known vulnerabilities (5 high, 3 medium), with the versions each affects and the releases that fix them.

## At a glance

- Latest release: 0.6.1 (Nov 1, 2026): no advisory affects it
- Newest unaffected release: 0.6.1 (Nov 1, 2026), the latest release
- Weekly downloads: 29.5M
- Releases: 40 since 0.1.0 (May 20, 2013)
- Registry: https://pypi.org/project/sqlparse/
- Releases read: Nov 8, 2026

## Version timeline

Affected versions per advisory, in version order:

- CVE-2026-84305: 0.1.0 to 0.5.5 (0.6.0 is outside it)
- CVE-2026-54284: 0.1.0 to 0.5.5 (0.6.0 is outside it)
- CVE-2026-59893: 0.1.0 to 0.5.5 (0.6.0 is outside it)
- CVE-2026-71491: 0.1.0 to 0.5.5 (0.6.0 is outside it)
- CVE-2026-59894: 0.1.0 to 0.5.5 (0.6.0 is outside it)
- CVE-2024-4340: 0.1.0 to 0.4.4 (0.5.0 is outside it)
- CVE-2023-30608: 0.1.15 to 0.4.3 (0.4.4 is outside it)
- CVE-2021-32839: 0.4.0 to 0.4.1 (0.4.2 is outside it)

## Advisories (8)

### [CVE-2026-84305](https://cve.now/CVE-2026-84305): sqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumption

- Severity: Medium 5.1
- Published: Sep 1, 2026
- Affected: fixed in 0.6.0.
- Fixed in 0.6.0 (released Aug 13, 2026, 19 days before disclosure).
- The latest release, 0.6.1, is not affected.

### [CVE-2026-54284](https://cve.now/CVE-2026-54284): sqlparse: TokenList.init materializes O(subtree) value per group, causing CPU DoS before depth/token caps trigger

- Severity: High 8.7
- Published: Aug 17, 2026
- Affected: fixed in 0.6.0.
- Fixed in 0.6.0 (released Aug 13, 2026, 4 days before disclosure).
- The latest release, 0.6.1, is not affected.

### [CVE-2026-59893](https://cve.now/CVE-2026-59893): sqlparse: Inefficient Regex Handling of Dollar-Quoted SQL Literals Leads to ReDoS (Denial of Service)

- Severity: High 7.5
- Published: Aug 17, 2026
- Affected: fixed in 0.6.0.
- Fixed in 0.6.0 (released Aug 13, 2026, 4 days before disclosure).
- The latest release, 0.6.1, is not affected.

### [CVE-2026-71491](https://cve.now/CVE-2026-71491): sqlparse: Quadratic O(n²) DoS in group\_comments

- Severity: High 8.7
- Published: Aug 17, 2026
- Affected: fixed in 0.6.0.
- Fixed in 0.6.0 (released Aug 13, 2026, 4 days before disclosure).
- The latest release, 0.6.1, is not affected.

### [CVE-2026-59894](https://cve.now/CVE-2026-59894): sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes

- Severity: Medium 6.2
- Published: Aug 17, 2026
- Affected: fixed in 0.6.0.
- Fixed in 0.6.0 (released Aug 13, 2026, 4 days before disclosure).
- The latest release, 0.6.1, is not affected.

### [CVE-2024-4340](https://cve.now/CVE-2024-4340): Passing a heavily nested list to sqlparse.parse() leads to a Denial of Service due to RecursionError.

- Severity: High 7.5
- Published: Apr 30, 2024
- Affected: fixed in 0.5.0; fixed in 0.5.0.
- Fixed in 0.5.0 (released Apr 13, 2024, 17 days before disclosure).
- The latest release, 0.6.1, is not affected.

### [CVE-2023-30608](https://cve.now/CVE-2023-30608): Parser contains an inefficient regular expression in sqlparse

- Severity: Medium 5.5
- Published: Apr 18, 2023
- Affected: from 0.1.15, fixed in 0.4.4.
- Fixed in 0.4.4 (released Apr 18, 2023, the day of disclosure).
- The latest release, 0.6.1, is not affected.

### [CVE-2021-32839](https://cve.now/CVE-2021-32839): Regular Expression Denial of Service in sqlparse

- Severity: High 7.5
- Published: Sep 20, 2021
- Affected: from 0.4.0, fixed in 0.4.2.
- Fixed in 0.4.2 (released Sep 10, 2021, 10 days before disclosure).
- The latest release, 0.6.1, is not affected.

---

Source: cve.now
Built by [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown), AI-native observability and security: automatic issue detection, plain-language log search and live dashboards.
Page: https://cve.now/packages/pypi/sqlparse
Site guide for agents: https://cve.now/llms.txt
Uses NVD data; not endorsed by NVD.
