CVE-2026-112307

7.3High

Published Oct 19, 2026 · NVD status: Deferred · AI triage by gemini-3.8-flash

7.3CVSS

High

0CVSS v3.110

Attack vector
Local
Complexity
Low
Privileges
None
User action
Required
Impact
High impact on confidentiality, integrity
Weakness
CWE-94

What an attacker gets

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 versions

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.

remediation — bash
$ pip install --upgrade sqlparse

AI-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.

References

Source: nvd.nist.gov/vuln/detail/CVE-2026-112307

More fully triaged vulnerabilities you may want to check next.