CVE-2026-59893 sqlparse: Inefficient Regex Handling of Dollar-Quoted SQL Literals Leads to ReDoS (Denial of Service)
An attacker can cause denial of service via quadratic CPU consumption in the sqlparse library by submitting crafted SQL literals.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-59893?
CVE-2026-59893 is a high-severity denial of service vulnerability in andialbrecht sqlparse, published on 17 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
sqlparse is a non-validating SQL parser module for Python. Prior to 0.6.0, SQL_REGEX in sqlparse/keywords.py and the per-position loop in sqlparse/lexer.py repeatedly scan unmatched dollar-quoted literal and multiline-comment delimiters, causing quadratic CPU consumption through sqlparse.parse(), sqlparse.format(), and sqlparse.split(). This issue is fixed in version 0.6.0.
Weakness: CWE-1333
Which versions are affected by CVE-2026-59893?
3 open source packages ship an affected version, including sqlparse.
| Package | Affected | Fixed in |
|---|---|---|
sqlparse PyPI | All versions | 0.6.0 |
sqlparse PyPI | All versions | 0.6.0 |
sqlparse PyPI | All versions | 0.6.0 |
How do I fix CVE-2026-59893?
Upgrade sqlparse to 0.6.0 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-59893 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59893 exists.
Sources
Also known as CLEANSTART-2026-JT70619, CLEANSTART-2026-QP37899, CLEANSTART-2026-VD54989, DEBIAN-CVE-2026-59893, ECHO-1e44-b57b-9d8b, GHSA-prg7-hcfm-mfcr and 8 more.