SB2026110688 - Multiple vulnerabilities in Sqlparse
Published: November 6, 2026
Breakdown by Severity
- Low
- Medium
- High
- Critical
Description
This security bulletin contains information about 2 vulnerabilities.
1) Inefficient regular expression complexity (CVE-ID: N/A)
CWE-ID: CWE-1333 - Inefficient Regular Expression Complexity
CVSSv4: 8.7 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
The vulnerability allows an attacker who can supply SQL for formatting to exhaust CPU resources and disrupt applications using Sqlparse.
The vulnerability exists due to quadratic regular expression backtracking in SPLIT_REGEX when formatting unterminated sequences of escaped quotes. An attacker who can supply SQL for formatting can submit repeated backslash-quote pairs through sqlparse.format() or the sqlformat CLI, causing disproportionately high CPU consumption even with relatively small inputs.
2) Code Injection (CVE-ID: CVE-2026-112307)
CWE-ID: CWE-94 - Improper Control of Generation of Code ('Code Injection')
CVSSv4: 8.6 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N]
The vulnerability allows an unauthenticated local attacker to execute arbitrary commands with the permissions of the PHP process.
The vulnerability exists due to missing dollar-sign escaping in Sqlparse's PHP output filter when attacker-controlled SQL is embedded in generated double-quoted PHP strings. An unauthenticated local attacker can supply SQL containing PHP interpolation expressions that execute when a victim subsequently runs the generated PHP snippet, rather than during formatting alone.
Remediation
Install update from vendor's website.