sqlparse Known Vulnerabilities & Fixes
sqlparse has 7 known security vulnerabilities in PyPI (Python). Upgrade to version 0.6.0 or later to resolve all known issues. Data sourced from OSV, enriched with EPSS exploit probability and CISA KEV.
Low Immediate Risk
No actively exploited vulnerabilities detected. Monitor and update in your next maintenance window.
Recommended safe version: 0.6.0
Upgrading to 0.6.0 or later resolves all 7 known vulnerabilities in sqlparse. Run: pip install "sqlparse>=0.6.0"
Is sqlparse in your project?
Check if you're affected and upgrade to 0.6.0 to stay secure.
Security Summary
- 7 affected version ranges have been identified across these 7 advisories.
- 100% of known issues have a published fixed version.
- Highest exploit-probability (EPSS) score for sqlparse: 4.2%.
- Remediation: pip install --upgrade sqlparse
Vulnerabilities
7 unique vulnerabilities — sorted by exploitation risk (KEV → EPSS → CVSS). Click a CVE/GHSA ID for full details. First disclosed Apr 15, 2024, most recently Sep 1, 2026 (869 days apart).
| CVE / GHSA | Severity |
|---|---|
| CVE-2024-4340 sqlparse parsing heavily nested list leads to Denial of Service
| HIGH |
| CVE-2026-59893 sqlparse: Inefficient Regex Handling of Dollar-Quoted SQL Literals Leads to ReDoS (Denial of Service)
| HIGH |
| CVE-2026-71491 sqlparse: Quadratic O(n²) DoS in group_comments
| HIGH |
| CVE-2026-54284 sqlparse: TokenList.__init__ materializes O(subtree) value per group, causing CPU DoS before depth/token caps trigger
| HIGH |
| CVE-2026-59894 sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes
| MEDIUM |
| CVE-2026-84305 sqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumption
| MEDIUM |
| GHSA-27jp-wm6q-gp25 sqlparse: formatting list of tuples leads to denial of service
| MEDIUM |
About This Data
Vulnerability data for sqlparse is sourced from the Open Source Vulnerability (OSV) database, aggregating reports from GitHub Advisory Database, NIST NVD, and ecosystem-specific sources.
CVSS (Common Vulnerability Scoring System) scores reflect exploitability and impact. EPSS (Exploit Prediction Scoring System) scores indicate the probability of exploitation within the next 30 days. Vulnerabilities marked with are listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
Related PyPI (Python) Packages
Other packages in this ecosystem, ranked by shared vulnerabilities where available.
Check Your Dependencies
Scan your project to check if you're using a vulnerable version of sqlparse.