CVE-2026-71491

sqlparse: Quadratic O(n²) DoS in group_comments

HIGH
8.7
CVSS Score
Published: August 17, 2026 at 05:16 PM UTC
Updated: October 23, 2026 at 04:10 PM UTC
1 product affected across 1 vendorSqlparse

Using sqlparse by andialbrecht?

Get instant alerts when new vulnerabilities affect sqlparse - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.7
Exploit prediction
EPSS 0.3%
SSVC
No known exploit

Description

sqlparse is a non-validating SQL parser module for Python. Prior to 0.6.0, group_comments in sqlparse/engine/grouping.py repeatedly rescans comment-only statements before the MAX_GROUPING_TOKENS guard, causing quadratic CPU consumption through sqlparse.parse() and sqlparse.format(sql, strip_comments=True). This issue is fixed in version 0.6.0.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 0.6.0
Affected range stops below 0.6.0, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCNo known exploitAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

8.7HIGHGitHub_M
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-400CWE-407

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card