{"id":"CVE-2026-112307","aliases":["DEBIAN-CVE-2026-112307","EUVD-2026-104399","GHSA-457h-p88w-wq8p","SUSE-SU-2026:5042-1","UBUNTU-CVE-2026-112307","openSUSE-SU-2026:12382-1"],"status":"published","title":"sqlparse through 0.6.0 PHP Code Injection via output_format='php'","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.","severity":{"version":"4.0","score":8.4,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00142,"percentile":0.03591,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-94"],"published":"2026-10-19T15:28:57Z","modified":"2026-11-03T13:15:07Z","fixes":[{"ecosystem":"SUSE:Linux Enterprise Module for Package Hub 15 SP7","package":"python-sqlparse","fixed_in":["0.2.4-150100.6.17.1"],"sources":["osv"]},{"ecosystem":"openSUSE:Tumbleweed","package":"python-sqlparse","fixed_in":["0.6.0-2.1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"sqlparse","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.2-1","0.4.2-1+deb12u1","0.4.4-1","0.5.0-1","0.5.1-1","0.5.1-2","0.5.2-1","0.5.3-1","0.5.4-1","0.5.5-1","0.5.5-2"]},{"source":"osv","ecosystem":"Debian:13","package":"sqlparse","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.5.3-1","0.5.4-1","0.5.5-1","0.5.5-2"]},{"source":"osv","ecosystem":"Debian:14","package":"sqlparse","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.5.3-1","0.5.4-1","0.5.5-1","0.5.5-2"]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Module for Package Hub 15 SP7","package":"python-sqlparse","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.2.4-150100.6.17.1"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"sqlparse","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.1.13-2ubuntu2","0.1.18-1","0.1.18-1ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"sqlparse","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.2.2-1","0.2.4-0.1","0.2.4-0.1ubuntu0.1","0.2.4-0.1ubuntu0.1+esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"sqlparse","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.2.4-1","0.2.4-1build1","0.2.4-2","0.2.4-3","0.2.4-3ubuntu0.1","0.2.4-3ubuntu0.1+esm1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"sqlparse","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.1-1ubuntu1","0.4.2-1","0.4.2-1ubuntu0.22.04.1","0.4.2-1ubuntu0.22.04.2","0.4.2-1ubuntu0.22.04.3"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"sqlparse","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.4.2-1ubuntu1","0.4.4-1","0.4.4-1ubuntu0.1","0.4.4-1ubuntu0.2"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"sqlparse","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.5.4-1","0.5.5-2","0.5.5-2ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"sqlparse","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.5.3-1","0.5.4-1","0.5.4-1ubuntu0.1"]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"python-sqlparse","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.0-2.1"}]}]}],"products":[{"vendor":"andialbrecht","product":"sqlparse"}],"references":[{"url":"https://github.com/andialbrecht/sqlparse/pull/930","tags":["patch","issue-tracking","fix"]},{"url":"https://github.com/andialbrecht/sqlparse/blob/0.6.0/sqlparse/filters/output.py","tags":["technical-description","article"]},{"url":"https://www.vulncheck.com/advisories/sqlparse-through-0.6.0-php-code-injection-via-output-format-php","tags":["third-party-advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-112307","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-457h-p88w-wq8p"},{"url":"https://pypi.org","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/112xxx/CVE-2026-112307.json","tags":["advisory"]},{"url":"https://github.com/andialbrecht/sqlparse","tags":["package"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-112307","tags":["advisory"]},{"url":"https://www.suse.com/support/update/announcement/2026/suse-su-20265042-1/","tags":["advisory"]},{"url":"https://bugzilla.suse.com/1286096","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2026-112307","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2026-112307","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-112307","tags":["report"]},{"url":"","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2026-112307","title":"sqlparse through 0.6.0 PHP Code Injection via output_format='php'","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.","status":"published","published":"2026-10-19T15:28:57.066Z","modified":"2026-10-19T16:41:10.929Z","cvss":[{"version":"4.0","score":8.4,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N","level":"high","assessor":"cna"},{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L","level":"high","assessor":"cna"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T13:44:40.64332Z"}],"euvd":[{"id":"EUVD-2026-104399","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.","status":"published","published":"2026-10-19T15:28:57Z","modified":"2026-10-19T16:41:10Z","cvss":[{"version":"4.0","score":8.4,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N","level":"high"}],"updated_at":"2026-11-02T16:59:50.835971Z"}],"ghsa":[{"id":"GHSA-457h-p88w-wq8p","title":"sqlparse through 0.6.0 contains a PHP code injection vulnerability that allows attackers to...","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.","status":"published","published":"2026-10-19T18:32:12Z","modified":"2026-10-19T18:32:16Z","cvss":[{"version":"4.0","score":8.4,"vector":"CVSS: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","level":"high"},{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L","level":"high"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T15:13:57.629988Z"}],"nvd":[{"id":"CVE-2026-112307","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.","status":"published","published":"2026-10-19T16:17:06.727Z","modified":"2026-10-19T17:17:15.78Z","cvss":[{"version":"4.0","score":8.4,"vector":"CVSS: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","level":"high","assessor":"secondary"},{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L","level":"high","assessor":"secondary"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:13:00.83844Z"}],"osv":[{"id":"CVE-2026-112307","title":"sqlparse through 0.6.0 PHP Code Injection via output_format='php'","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.","status":"published","published":"2026-10-19T15:28:57.066Z","modified":"2026-11-03T13:27:00.990431768Z","cvss":[{"version":"4.0","score":8.4,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-94"],"updated_at":"2026-11-03T14:04:55.31869Z"},{"id":"DEBIAN-CVE-2026-112307","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.","status":"published","published":"2026-10-19T16:17:06.727Z","modified":"2026-10-23T18:05:32.990436468Z","cvss":[{"version":"4.0","score":8.4,"vector":"CVSS: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","level":"high"}],"updated_at":"2026-11-02T15:45:49.824149Z"},{"id":"UBUNTU-CVE-2026-112307","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.","status":"published","published":"2026-10-19T16:17:00Z","modified":"2026-10-28T20:17:43.210866349Z","cvss":[{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L","level":"high"},{"version":"4.0","score":8.4,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N","level":"high"}],"updated_at":"2026-11-02T16:55:59.591851Z"},{"id":"openSUSE-SU-2026:12382-1","title":"python313-sqlparse-0.6.0-2.1 on GA media","description":"These are all security issues fixed in the python313-sqlparse-0.6.0-2.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-11-01T00:00:00Z","modified":"2026-11-02T12:15:06.026128944Z","updated_at":"2026-11-02T16:58:41.463445Z"},{"id":"SUSE-SU-2026:5042-1","title":"Security update for python-sqlparse","description":"This update for python-sqlparse fixes the following issue:\n\n- CVE-2026-112307: arbitrary code execution via unescaped PHP output formatting (bsc#1286096).\n","status":"published","published":"2026-11-02T17:29:29Z","modified":"2026-11-03T13:15:07.822567879Z","updated_at":"2026-11-03T13:33:04.521148Z"}]}}
