CVE-2026-112307: Improper Control of Generation of Code ('Code Injection') in andialbrecht sqlparse
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.
CVSS v4.0
Score 8.4high
Affected software
andialbrecht
sqlparse
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-112307 describes a PHP code injection vulnerability in the andialbrecht sqlparse library through version 0.6.0. Attackers can supply SQL text containing unescaped dollar signs that embed ${expr} or {${expr}} sequences. These sequences are processed by OutputPHPFilter and placed inside double-quoted strings, resulting in execution of arbitrary PHP code when the generated snippet executes. This improper control of code generation allows for remote code execution under certain conditions.
Potential Impact
Successful exploitation enables an attacker to execute arbitrary PHP code within the context of the application using sqlparse. This can lead to unauthorized actions, data compromise, or system control depending on the environment where sqlparse is used.
Mitigation Recommendations
No explicit patch or remediation is provided in the available data. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid processing untrusted SQL text containing dollar signs with sqlparse or apply manual sanitization to prevent injection of PHP expressions.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-10-19T14:14:28.728Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ad63bfd2cdf04f65667d8bc
Added to database: 10/19/2026, 15:49:17 UTC
Last enriched: 10/19/2026, 16:03:26 UTC
Last updated: 10/19/2026, 19:06:47 UTC
Views: 9
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.