# CVE-2026-112307: sqlparse through 0.6.0 PHP Code Injection via output\_format='php'

- Priority: **Routine**
- Reason: Not severe (CVSS 8.4, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-10-19 · Modified: 2026-11-10
- Aliases: DEBIAN-CVE-2026-112307, UBUNTU-CVE-2026-112307, CGA-hpjw-w5qw-8376, CGA-2ggp-38hj-7vm3, CGA-5g55-3272-vj3c, CGA-6jmm-55h9-cx5h, CGA-r3r2-qx48-6m4x, CGA-wfj9-q965-58hf, CGA-xg49-r8mc-6hc3, CGA-r9g2-q4mw-7v8f, CGA-83xr-g23w-5324, CGA-9498-v25m-xhv8, openSUSE-SU-2026:12382-1, SUSE-SU-2026:5042-1, SUSE-SU-2026:5465-1, SUSE-SU-2026:5497-1, MGASA-2026-0642
- Record: https://cvemate.com/vulnerability/CVE-2026-112307 · JSON: https://cvemate.com/vulnerability/CVE-2026-112307/json

## Description

```text
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.
```

## Signals

- CVSS: 8.4 high (v4.0, CVE.org) 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
- EPSS: 0.198%, percentile 9.979%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 24)

- andialbrecht sqlparse: ≤ 0.6.0
- chainguard py3-sqlparse (Chainguard): \< 0.6.1-r0
- chainguard py3.10-sqlparse (Chainguard): All versions (No fix recorded) \| \< 0.6.1-r0
- chainguard py3.11-sqlparse (Chainguard): All versions (No fix recorded) \| \< 0.6.1-r0
- chainguard py3.12-sqlparse (Chainguard): All versions (No fix recorded) \| \< 0.6.1-r0
- chainguard py3.13-sqlparse (Chainguard): \< 0.6.1-r0
- chainguard py3.14-sqlparse (Chainguard): All versions (No fix recorded) \| \< 0.6.1-r0
- wolfi py3-sqlparse (Wolfi): \< 0.6.1-r0
- wolfi py3.10-sqlparse (Wolfi): All versions (No fix recorded) \| \< 0.6.1-r0
- wolfi py3.11-sqlparse (Wolfi): All versions (No fix recorded) \| \< 0.6.1-r0
- wolfi py3.12-sqlparse (Wolfi): All versions (No fix recorded) \| \< 0.6.1-r0
- wolfi py3.13-sqlparse (Wolfi): \< 0.6.1-r0
- wolfi py3.14-sqlparse (Wolfi): All versions (No fix recorded) \| \< 0.6.1-r0
- debian sqlparse (Debian): All versions (No fix recorded)
- ubuntu sqlparse (Ubuntu): All versions (No fix recorded)
- mageia python-sqlparse (Mageia): \< 0.6.1-1.mga10
- opensuse python-sqlparse&distro=openSUSE Tumbleweed (openSUSE): \< 0.6.0-2.1
- suse python-sqlparse&distro=SUSE Linux Enterprise Module for Package Hub 15 SP7 (SUSE Linux Enterprise): \< 0.2.4-150100.6.17.1
- suse python-sqlparse&distro=SUSE Linux Enterprise Module for Public Cloud 15 SP4 (SUSE Linux Enterprise): \< 0.4.4-150400.6.22.1
- suse python-sqlparse&distro=SUSE Linux Enterprise Module for Public Cloud 15 SP5 (SUSE Linux Enterprise): \< 0.4.4-150400.6.22.1

## References (first 20 of 23)

- <https://github.com/andialbrecht/sqlparse/pull/930>
- <https://github.com/andialbrecht/sqlparse/blob/0.6.0/sqlparse/filters/output.py>
- <https://www.vulncheck.com/advisories/sqlparse-through-0.6.0-php-code-injection-via-output-format-php>
- <https://security-tracker.debian.org/tracker/CVE-2026-112307>
- <https://ubuntu.com/security/CVE-2026-112307>
- <https://www.cve.org/CVERecord?id=CVE-2026-112307>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/112xxx/CVE-2026-112307.json>
- <https://github.com/andialbrecht/sqlparse>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-112307>
- <https://pypi.org>
- <https://www.suse.com/security/cve/CVE-2026-112307>
- <https://www.suse.com/support/update/announcement/2026/suse-su-20265042-1/>
- <https://bugzilla.suse.com/1286096>
- <http://www.openwall.com/lists/oss-security/2026/11/10/20>
- <https://www.suse.com/support/update/announcement/2026/suse-su-20265465-1/>
- <https://www.suse.com/support/update/announcement/2026/suse-su-20265497-1/>
- <https://advisories.mageia.org/MGASA-2026-0642.html>
- <https://bugs.mageia.org/show_bug.cgi?id=36750>
- <https://www.openwall.com/lists/oss-security/2026/11/10/20>
- <https://github.com/andialbrecht/sqlparse/blob/master/CHANGELOG>

---

Data as of 2026-12-05T04:11:31.346Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
