CVE-2026-59894CWE-94code-injection

CVE-2026-59894

published August 17, 2026

CVSS
6.2
EPSS
0%
Percentile
2.3
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS
6.2 · NONE
CVSS v4.0
6.2 · 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
EPSS
0.00129 · 2.3th percentile
Weakness
CWE-94 · Improper Control of Generation of Code ('Code Injection')
Published
2026-08-17T22:17Z
References (1)
EPSS history
Timeline
  • 17 AUG 17:14Z
    sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes
    cvelistv5