AploSec / Disclosures / CVE-2026-112307
sqlparse through 0.6.0 PHP Code Injection via output_format='php'
CVE-2026-112307 · published 2026-10-19
Summary
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 with a proof of concept that reproduced against the affected release.
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
- Package
- sqlparse
- Ecosystem
- PyPI
- Weekly downloads
- 28M
- Affected
- through 0.6.0
- Fixed
- None
- Weakness
- CWE-94
- CNA
- VulnCheck
- Credit
- xiehuanyi, Zachariah Mithani