Arbitrary Code Injection Affecting python313-sqlparse package, versions <0.5.3-160000.4.1


Severity

Recommended
0.0
medium
0
10

Based on SUSE Linux Enterprise Server security rating.

Threat Intelligence

EPSS
0.13% (3rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-SLES1600-PYTHON313SQLPARSE-20265535
  • published29 Sept 2026
  • disclosed30 Aug 2026

Introduced: 30 Aug 2026

CVE-2026-59894  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade SLES:16.0.0 python313-sqlparse to version 0.5.3-160000.4.1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream python313-sqlparse package and not the python313-sqlparse package as distributed by SLES. See How to fix? for SLES:16.0.0 relevant fixed versions and status.

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 Base Scores

version 3.1