CVE-2026-112307: sqlparse through 0.6.0 PHP Code Injection via output_format='php'
Vulnerability summary
CVE-2026-112307 is a high (CVSS 8.4) Improper Control of Generation of Code vulnerability in andialbrecht sqlparse. EPSS estimates a 0.20% chance of exploitation in the next 30 days, higher than 9.9% of scored vulnerabilities.
Not severe (CVSS 8.4, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 4Timeline
- 19-10-2026PublishedVulnerability first disclosed.
- 10-11-2026Last modifiedVulnerability information updated.
Description
sqlparse through 0.6.0 contains a PHP code injection vulnerability that allows attackers to inject PHP expressions by supplying SQL text containing unescaped dollar signs. Attackers can embed ${expr} or {${expr}} sequences that OutputPHPFilter places in double-quoted strings, executing arbitrary PHP code when the generated snippet runs.
CVSS metrics
9 scores · 6 sources · 2 versions- NVDNIST8.4HighCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N/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 · DebianEcosystem advisory · calculated8.4HighCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N/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 · WolfiEcosystem advisory · calculated8.4HighCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
- OSV · ChainguardEcosystem advisory · calculated8.4HighCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
- OSV · UbuntuEcosystem advisory · calculated8.4HighCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
- NVDNIST7.3HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L
- OSV · UbuntuEcosystem advisory · calculated7.3HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L
EPSS trend
Probability
0.20%
Chance of exploitation in the next 30 days
Percentile
10%
Versus all other CVEs
30-day change
Increase +0.06 pp
From 0.14% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Suse7 products
- python-sqlparse&distro=SUSE Linux Enterprise Module for Package Hub 15 SP7< 0.2.4-150100.6.17.1
- python-sqlparse&distro=SUSE Linux Enterprise Module for Public Cloud 15 SP4< 0.4.4-150400.6.22.1
- python-sqlparse&distro=SUSE Linux Enterprise Module for Public Cloud 15 SP5< 0.4.4-150400.6.22.1
- python-sqlparse&distro=SUSE Linux Enterprise Module for Public Cloud 15 SP6< 0.4.4-150600.3.15.1
- python-sqlparse&distro=SUSE Linux Enterprise Module for Python 3 15 SP7< 0.4.4-150600.3.15.1
Chainguard6 products
- py3-sqlparse< 0.6.1-r0
- py3.10-sqlparseAll versions (No fix recorded) | < 0.6.1-r0
- py3.11-sqlparseAll versions (No fix recorded) | < 0.6.1-r0
- py3.12-sqlparseAll versions (No fix recorded) | < 0.6.1-r0
- py3.13-sqlparse< 0.6.1-r0
Wolfi6 products
- py3-sqlparse< 0.6.1-r0
- py3.10-sqlparseAll versions (No fix recorded) | < 0.6.1-r0
- py3.11-sqlparseAll versions (No fix recorded) | < 0.6.1-r0
- py3.12-sqlparseAll versions (No fix recorded) | < 0.6.1-r0
- py3.13-sqlparse< 0.6.1-r0
Andialbrecht1 product
- sqlparse≤ 0.6.0
Debian1 product
- sqlparseAll versions (No fix recorded)
Mageia1 product
- python-sqlparse< 0.6.1-1.mga10
Opensuse1 product
- python-sqlparse&distro=openSUSE Tumbleweed< 0.6.0-2.1
Ubuntu1 product
- sqlparseAll versions (No fix recorded)
8 vendors · 24 products
References
23 links- www.vulncheck.com/advisories/sqlparse-through-0.6.0-php-code-injection-via-output-format-phpThird Party AdvisoryAdvisory
- pypi.orgWEB