SQL Parsing Vulnerability in Python's sqlparse Module
CVE-2026-59893
7.5HIGH
What is CVE-2026-59893?
The sqlparse module, a widely used SQL parser for Python, is susceptible to a performance issue prior to version 0.6.0. Specifically, the SQL_REGEX in sqlparse/keywords.py, coupled with inefficient looping in sqlparse/lexer.py, leads to excessive CPU consumption when dealing with unmatched dollar-quoted literals and multiline comments. This can severely degrade application performance, especially in applications that rely heavily on complex SQL queries. Users are urged to upgrade to version 0.6.0 or later to eliminate this problem and enhance system stability.
Affected Version(s)
sqlparse < 0.6.0
