AploSec / Disclosures / CVE-2026-112307
sqlparse through 0.6.0 PHP Code Injection via output_format='php'
CVE-2026-112307 · published 2026-10-19
In plain words: this type of bug lets someone run their own code inside the application (code injection). No fixed release is listed yet.
Summary
CVE-2026-112307 affects sqlparse (PyPI) through 0.6.0: PHP code injection via output_format php (CWE-94). No fixed release is listed. CVSS 4.0 base score 8.4 (High), assigned by VulnCheck. Published 2026-10-19 by VulnCheck. Credit: xiehuanyi, Zachariah Mithani.
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.
Evidence
Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.
Remediation
No fixed release is listed in the advisory. Check the references for upstream status.
References
- VulnCheck advisoryhttps://www.vulncheck.com/advisories/sqlparse-through-0.6.0-php-code-injection-via-output-format-php
- Fix pull requesthttps://github.com/andialbrecht/sqlparse/pull/930
- Vulnerable codehttps://github.com/andialbrecht/sqlparse/blob/0.6.0/sqlparse/filters/output.py
- CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-112307
- Severity
- High 8.4CVSS 4.0, scored by VulnCheck in the CVE record
- Package
- sqlparse
- Ecosystem
- PyPI
- Affected
- through 0.6.0
- Fixed
- None
- Weakness
- CWE-94
- CNA
- VulnCheck
- Credit
- xiehuanyifinderZachariah Mithanifinder