Security mailing lists by PureSourceCode

CVE-2026-59894

MEDIUM 6.2CVSS 4.0

sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes

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.

Published
17 Aug 2026
Last modified
23 Oct 2026
Assigned by
security-advisories@github.com
NVD status
Deferred
Weakness
CWE-94
Also known as
GHSA-3496-9g83-7v6xPYSEC-2026-3696
Sources
NVDJSONOSV GHSA-3496-9g83-7v6xJSONOSV PYSEC-2026-3696JSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) CVSS 4.0 MEDIUM 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
OSV GitHub CVSS 4.0 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
OSV PyPA CVSS 4.0 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

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV PyPI sqlparse < 0.6.0 0.6.0

References

History

  • 25 Nov 2026 21:04 UTC · NVD: first stored (published 17 Aug 2026)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 19 Aug 2026)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 17 Aug 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.