CVE-2026-59894: medium-severity vulnerability in andialbrecht sqlparse
sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes
Published
E-mail alert when it lands in KEV, gets a public PoC or its score goes up.
13Vexday Risk Score
No sign of exploitation. No public exploitation artifact known so far.
ssvc Trackcvss 6.2epss 0.1%
sqlparse is a non-validating SQL parser module for Python. Prior to 0.6.0, sqlparse/filters/output.py fails to escape existing backslashes before quotes in sqlparse.format output_format='python' and output_format='php' and the corresponding sqlformat -l modes, allowing crafted SQL to terminate the generated string and inject Python or PHP code when a downstream consumer executes or imports the generated source. This issue is fixed in version 0.6.0.
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:L
Affected products
andialbrecht · sqlparseRelated CVEs — andialbrecht sqlparse
In the same product, most dangerous first.
CVE-2021-32839HIGHRegular Expression Denial of Service in sqlparseEPSS 2.3%CVE-2023-30608MEDIUMParser contains an inefficient regular expression in sqlparseEPSS 1.0%CVE-2026-59893HIGHsqlparse: Inefficient Regex Handling of Dollar-Quoted SQL Literals Leads to ReDoS (Denial of Service)EPSS 0.3%CVE-2026-54284HIGHsqlparse: TokenList.__init__ materializes O(subtree) value per group, causing CPU DoS before depth/token caps triggerEPSS 0.3%CVE-2026-71491HIGHsqlparse: Quadratic O(n²) DoS in group_commentsEPSS 0.3%CVE-2026-84305MEDIUMsqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumptionEPSS 0.2%