CVE-2026-59894: sqlparse is a non-validating SQL parser module for Python
CVE-2026-59894 is a medium-severity flaw (CVSS 6.2) affecting affected software. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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.
Why this priority
- No elevated risk signals yet
No fix is published yet: follow the downgrade or mitigation steps.
Risk facts
| CVSS score | 6.2 (Medium) |
| Attack vector | Local |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | Passive |
| EPSS exploit chance | 0.1% (top 98%) |
| CISA exploited list | No |
| Weakness | CWE-94 |
| Published | 2026-08-17 |
| Last modified | 2026-10-23 |
Last updated 2026-10-23 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2026-59894?
No fixed release is listed yet. Watch the vendor advisory and apply any mitigation shown on this page.
Is CVE-2026-59894 being exploited?
CVE-2026-59894 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2026-59894 affect?
CVE-2026-59894 affects affected software. Severity is medium (CVSS 6.2). 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
How urgent is CVE-2026-59894?
Priority 22/100. No elevated risk signals yet.
Software pages
PHP vulnerabilities · Python vulnerabilities