Inefficient regular expression complexity in Sqlparse - #VU159749
Published: November 6, 2026
Vulnerability details
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.