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.
https://www.vulncheck.com/advisories/sqlparse-through-0.6.0-php-code-injection-via-output-format-php
https://github.com/andialbrecht/sqlparse/pull/930
https://github.com/andialbrecht/sqlparse/blob/0.6.0/sqlparse/filters/output.py
Published: 2026-10-19
Updated: 2026-10-19
Base Score: 6.8
Vector: CVSS2#AV:L/AC:L/Au:N/C:C/I:C/A:P
Severity: Medium
Base Score: 7.3
Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L
Severity: High
Base Score: 8.4
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
Severity: High
EPSS: 0.00144