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.
History

Thu, 27 Aug 2026 18:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-1050
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Important


Fri, 21 Aug 2026 13:00:00 +0000

Type Values Removed Values Added
First Time appeared Andialbrecht
Andialbrecht sqlparse
Vendors & Products Andialbrecht
Andialbrecht sqlparse

Mon, 17 Aug 2026 22:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 17 Aug 2026 17:30:00 +0000

Type Values Removed Values Added
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.
Title sqlparse: Quadratic O(n²) DoS in group_comments
Weaknesses CWE-400
CWE-407
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published: 2026-08-17T17:16:48.973Z

Updated: 2026-08-17T22:01:34.222Z

Reserved: 2026-08-06T19:56:23.725Z

Link: CVE-2026-71491

cve-icon Vulnrichment

Updated: 2026-08-17T22:00:15.893Z

cve-icon NVD

Status : Deferred

Published: 2026-08-17T18:18:12.120

Modified: 2026-09-09T21:11:46.833

Link: CVE-2026-71491

cve-icon Redhat

Severity : Important

Publid Date: 2026-08-17T17:16:48Z

Links: CVE-2026-71491 - Bugzilla