Skip to main content

CVE-2026-112307: Improper Control of Generation of Code ('Code Injection') in andialbrecht sqlparse

0
High
VulnerabilityCVE-2026-112307cvecve-2026-112307
Published: 10/19/2026 (10/19/2026, 15:28:57 UTC)
Source: CVE Database V5
Vendor/Project: andialbrecht
Product: 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

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
Low
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

andialbrecht

sqlparse

Affected versions
>=0 <=0.6.0
sqlparse
pkg:pypi/sqlparse
Affected versions
>=0 <=0.6.0

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

AILast updated: 10/19/2026, 16:03:26 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses