CVE-2026-112307 sqlparse through 0.6.0 PHP Code Injection via output_format='php'

High 8.4 Published Updated

Attackers can execute arbitrary PHP code by injecting expressions into SQL text when using the PHP output format in the sqlparse library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2026-112307?

CVE-2026-112307 is a high-severity code injection vulnerability in andialbrecht sqlparse, published on 19 Oct 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

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

Weakness: CWE-94

Which versions are affected by CVE-2026-112307?

How do I fix CVE-2026-112307?

No fix has been published for CVE-2026-112307 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-112307 being exploited?

There is no known exploitation of CVE-2026-112307 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2026-112307, GHSA-457h-p88w-wq8p, UBUNTU-CVE-2026-112307.

Is CVE-2026-112307 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free