PT-2026-76735
CVE-2026-59893
·
Published
2026-08-17
·
Updated
2026-10-23
Description by
CVSS 3.1
7.5
HighMetricsAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Name of the Vulnerable Software and Affected Versions
sqlparse versions prior to 0.6.0
Description
sqlparse contains a Regular Expression Denial of Service (ReDoS) issue where the lexer repeatedly scans unmatched dollar-quoted literals and multiline-comment delimiters. This occurs because the regex patterns in
sqlparse/keywords.py use a lazy quantifier that, when paired with a missing closing delimiter, forces the engine to scan the remaining input at every character position. This results in quadratic CPU consumption (O(n²)) when processing specially crafted SQL text, potentially leading to sustained CPU exhaustion and service unavailability. The issue is triggered through the sqlparse.parse(), sqlparse.format(), and sqlparse.split() functions. Specifically, the SQL REGEX in sqlparse/keywords.py and the per-position loop in sqlparse/lexer.py are the vulnerable components.Recommendations
Update sqlparse to version 0.6.0 or later.
Found an issue in the description? Have something to add? Feel free to write us 👾