Code Injection in Sqlparse - CVE-2026-59894
Published: August 13, 2026
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary code.
The vulnerability exists due to improper control of generation of code in the Python and PHP output filters when generating source-code snippets from caller-supplied SQL. A remote attacker can supply crafted SQL containing backslashes and quotes to execute arbitrary code.
Formatting alone does not execute the payload; exploitation requires a downstream workflow to execute or import the generated Python or PHP snippet. User interaction is required to trigger execution of the generated source.
Affected software
SUSE Linux Enterprise Server 15 SP6
SUSE Linux Enterprise Server 15 SP5
SUSE Linux Enterprise Server 15 SP4
SUSE Linux Enterprise Server for SAP Applications 15
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise High Performance Computing 15
SUSE Linux Enterprise High Performance Computing ESPOS 15
SUSE Linux Enterprise High Performance Computing LTSS 15
SUSE Linux Enterprise Real Time 15
SUSE Linux Enterprise Desktop 15
SUSE Manager Server
SUSE Manager Retail Branch Server
SUSE Manager Proxy
Public Cloud Module
SUSE Package Hub 15
Basesystem Module
Python 3 Module
openSUSE Leap
openEuler
Db2 Bridge
python2-sqlparse
python3-sqlparse
python-sqlparse
python311-sqlparse
How to mitigate CVE-2026-59894
Db2 Bridge - update to 1.1.5.2
python2-sqlparse - update to 0.2.4-150100.6.11.1
python3-sqlparse - update to 0.4.2-150300.23.1
python-sqlparse - addressed in versions 0.4.4-4, 0.6.0-1
python3-sqlparse - addressed in versions 0.4.4-4, 0.6.0-1
python311-sqlparse - addressed in versions 0.4.4-150400.6.16.1, 0.4.4-150600.3.9.1
External References
Related Security Bulletins
- Multiple vulnerabilities in Sqlparse
- SUSE update for python-sqlparse
- SUSE update for python3-sqlparse
- SUSE update for python-sqlparse
- SUSE update for python-sqlparse
- openEuler 24.03 LTS SP4 update for python-sqlparse
- openEuler 24.03 LTS SP3 update for python-sqlparse
- openEuler 24.03 LTS SP1 update for python-sqlparse
- Multiple vulnerabilities in IBM Db2 Bridge