CVE-2026-112307
7.3HighPublished 19 Oct 2026 · NVD status: Deferred · AI triage by gemini-3.8-flash
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
- Impact
- High impact on confidentiality, integrity
- Weakness
- CWE-94
Impact
Attackers can achieve arbitrary PHP code execution by supplying crafted SQL containing dollar-sign expressions to applications that process or export SQL into PHP snippets. This requires user interaction or an application path that accepts attacker-supplied SQL and executes the resulting PHP output.
Root cause
OutputPHPFilter places unescaped dollar signs from input SQL inside double-quoted PHP strings, allowing embedded variable interpolation like ${expr} to evaluate as code.
Affected systems
sqlparse through 0.6.0
CVSS v3.1 · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L
Fix & remediation
Upgrade sqlparse to a version containing pull request #930 once released. As an interim mitigation, stop using sqlparse's PHP output formatting (OutputPHPFilter) on untrusted SQL input.
$ pip install --upgrade sqlparseAI-suggested. Run it in staging first and check it against the vendor advisory. Why?
NVD 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.