CVE-2026-112307 PUBLISHED

sqlparse through 0.6.0 PHP Code Injection via output_format='php'

Assigner: VulnCheck
Reserved: 19.10.2026 Published: 19.10.2026 Updated: 19.10.2026

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.

Metrics

CVSS Vector: 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
CVSS Score: 8.4

Product Status

Vendor andialbrecht
Product sqlparse
Versions Default: unaffected
  • affected from 0 to 0.6.0 (incl.)

Credits

  • xiehuanyi finder
  • Zachariah Mithani finder

References

Problem Types

  • Improper Control of Generation of Code ('Code Injection') CWE