
CVE catalog
CVE-2026-59894
sqlparse: CVE-2026-59894
- Severity
- Medium · CVSS 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 - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 0.13% · Oct 25, 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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | sqlparse | sid | 0.5.5-2 | vulnerable |
| Debian | sqlparse | forky | 0.5.5-2 | vulnerable |
| Debian | sqlparse | trixie | 0.5.3-1 | vulnerable |
| Debian | sqlparse | bookworm | 0.4.2-1+deb12u1 | vulnerable |
| PyPI | sqlparse | Not reported | 0.6.0 | fixed |
| PyPI | sqlparse | Not reported | 0.6.0 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | sqlparse | source | sid | (unfixed) | not yet assigned | Not reported | [1144932] |
| Debian | sqlparse | source | forky | (unfixed) | not yet assigned | Not reported | [1144932] |
| Debian | sqlparse | source | trixie | (unfixed) | not yet assigned | Not reported | [1144932] |
| Debian | sqlparse | source | bookworm | (unfixed) | not yet assigned | Not reported | [1144932] |
| PyPI | sqlparse | PyPI | Not reported | 0.6.0 | Not reported | GHSA-3496-9G83-7V6X | Not reported |
| PyPI | sqlparse | PyPI | Not reported | 0.6.0 | Not reported | PYSEC-2026-3696 | Not reported |
Notes
[trixie] sqlparse: Minor issue [bookworm] sqlparse: Minor issue
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [python3-sqlparse]Affected
Source package: [sqlparse]
Details (2)
0.4.2-1+deb12u1· all · bookwormAffected
dsa · sqlparse · debian · bookworm; dsa · sqlparse · debian · 12
0.4.2-1+deb12u1· all · bookwormAffected
dsa · sqlparse · debian · bookworm; dsa · sqlparse · debian · 12
- [python-sqlparse-doc]Affected
Source package: [sqlparse]
Details (2)
0.4.2-1+deb12u1· all · bookwormAffected
dsa · sqlparse · debian · bookworm; dsa · sqlparse · debian · 12
0.4.2-1+deb12u1· all · bookwormAffected
dsa · sqlparse · debian · bookworm; dsa · sqlparse · debian · 12
- [sqlformat]Affected
Source package: [sqlparse]
Details (2)
0.4.2-1+deb12u1· all · bookwormAffected
dsa · sqlparse · debian · bookworm; dsa · sqlparse · debian · 12
0.4.2-1+deb12u1· all · bookwormAffected
dsa · sqlparse · debian · bookworm; dsa · sqlparse · debian · 12
[Debian 13 (Trixie)]
- [python3-sqlparse]Affected
Source package: [sqlparse]
Details (2)
0.5.3-1· all · trixieAffected
dsa · sqlparse · debian · 13
0.5.3-1· all · trixieAffected
dsa · sqlparse · debian · 13
- [python-sqlparse-doc]Affected
Source package: [sqlparse]
Details (2)
0.5.3-1· all · trixieAffected
dsa · sqlparse · debian · 13
0.5.3-1· all · trixieAffected
dsa · sqlparse · debian · 13
- [sqlformat]Affected
Source package: [sqlparse]
Details (2)
0.5.3-1· all · trixieAffected
dsa · sqlparse · debian · 13
0.5.3-1· all · trixieAffected
dsa · sqlparse · debian · 13
Observed:
References
- [https://ftp.suse.com/pub/projects/security/csaf/opensuse-su-2026_11557-1.json]
- [https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-3496-9g83-7v6x]
- [https://nvd.nist.gov/vuln/detail/CVE-2026-59894]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2026-59894]
- [https://osv.dev/vulnerability/GHSA-3496-9g83-7v6x]
- [https://security-tracker.debian.org/tracker/CVE-2026-59894]
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-59894.json]
[Debian Security Tracker] · [FIRST EPSS] · [GitHub Advisory Database] · [National Vulnerability Database (NVD)] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX] · [SUSE security advisories and VEX]