Mend.io Vulnerability Database
The largest open source vulnerability database
What is a Vulnerability ID?
New vulnerability? Tell us about it!
CVE-2026-59894
Published:August 17, 2026
Updated:September 01, 2026
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.
Affected Packages
sqlparse (CONDA):
Affected version(s) >=0.1.7 <0.6.0
Fix Suggestion:
Update to version 0.6.0
https://github.com/andialbrecht/sqlparse.git (GITHUB):
Affected version(s) >=0.1.0 <0.6.0
Fix Suggestion:
Update to version 0.6.0
sqlparse (PYTHON):
Affected version(s) >=0.1.0 <0.6.0
Fix Suggestion:
Update to version 0.6.0
Do you need more information?
Contact Us
CVSS v4
Base Score:
6.2
Attack Vector
LOCAL
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
PASSIVE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
NONE
Vulnerable System Availability
NONE
Subsequent System Confidentiality
HIGH
Subsequent System Integrity
HIGH
Subsequent System Availability
LOW
CVSS v3
Base Score:
8.5
Attack Vector
LOCAL
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
LOW
Weakness Type (CWE)
Improper Control of Generation of Code ('Code Injection')
EPSS
Base Score:
0.13