PT-2026-76735 · Pypi · Sqlparse

CVE-2026-59893

·

Published

2026-08-17

·

Updated

2026-09-01

CVSS v3.1

7.5

High

VectorAV: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.

Exploit

Fix

DoS

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-59893
ECHO-1E44-B57B-9D8B
GHSA-PRG7-HCFM-MFCR
OESA-2026-3547
OPENSUSE-SU-2026:11557-1
OPENSUSE-SU-2026:21690-1
PYSEC-2026-3698
SUSE-SU-2026:3762-1
SUSE-SU-2026:3906-1
SUSE-SU-2026:3907-1
SUSE-SU-2026:3910-1

Affected Products

Sqlparse