Resource exhaustion in Sqlparse - CVE-2026-71491

 

Resource exhaustion in Sqlparse - CVE-2026-71491

Published: August 13, 2026


Vulnerability identifier: #VU142413
CSH Severity: Medium
CVSS v4: 8.7 [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-ID: CVE-2026-71491
CWE-ID: CWE-400
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to uncontrolled resource consumption in the group_comments function when parsing a comment-only SQL statement. A remote attacker can supply many single-line comments to consume excessive CPU resources and cause a denial of service.

The issue is reachable via sqlparse.parse() and sqlparse.format(sql, strip_comments=true), and the quadratic cost is incurred before the token-count guard is applied.


Affected software

Sqlparse

How to mitigate CVE-2026-71491

Install security update from vendor's website.

Sqlparse - update to 0.6.0

External References

Related Security Bulletins