CVE-2026-71491: CWE-400: Uncontrolled Resource Consumption in andialbrecht sqlparse
CVE-2026-71491 is a high-severity vulnerability in the Python sqlparse module prior to version 0.6.0. The issue involves uncontrolled resource consumption due to the group_comments function repeatedly rescanning comment-only SQL statements, leading to quadratic CPU usage during parsing and formatting operations. This vulnerability can cause significant performance degradation when processing certain SQL inputs. The issue is fixed in sqlparse version 0.6.0.
AI Analysis
Technical Summary
The sqlparse Python module before version 0.6.0 contains an uncontrolled resource consumption vulnerability (CWE-400) in the group_comments function located in sqlparse/engine/grouping.py. This function repeatedly rescans comment-only statements before reaching the MAX_GROUPING_TOKENS guard, resulting in quadratic CPU consumption when using sqlparse.parse() or sqlparse.format(sql, strip_comments=True). This flaw can severely degrade performance and is addressed by updating to version 0.6.0.
Potential Impact
Exploitation of this vulnerability can cause excessive CPU usage, leading to denial of service or degraded performance in applications that parse or format SQL statements using vulnerable versions of sqlparse. There are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade sqlparse to version 0.6.0 or later, where this uncontrolled resource consumption issue has been fixed. No other mitigations are indicated.
CVE-2026-71491: CWE-400: Uncontrolled Resource Consumption in andialbrecht sqlparse
Description
CVE-2026-71491 is a high-severity vulnerability in the Python sqlparse module prior to version 0.6.0. The issue involves uncontrolled resource consumption due to the group_comments function repeatedly rescanning comment-only SQL statements, leading to quadratic CPU usage during parsing and formatting operations. This vulnerability can cause significant performance degradation when processing certain SQL inputs. The issue is fixed in sqlparse version 0.6.0.
CVSS v4.0
Score 8.7high
Affected software
andialbrecht
sqlparse
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The sqlparse Python module before version 0.6.0 contains an uncontrolled resource consumption vulnerability (CWE-400) in the group_comments function located in sqlparse/engine/grouping.py. This function repeatedly rescans comment-only statements before reaching the MAX_GROUPING_TOKENS guard, resulting in quadratic CPU consumption when using sqlparse.parse() or sqlparse.format(sql, strip_comments=True). This flaw can severely degrade performance and is addressed by updating to version 0.6.0.
Potential Impact
Exploitation of this vulnerability can cause excessive CPU usage, leading to denial of service or degraded performance in applications that parse or format SQL statements using vulnerable versions of sqlparse. There are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade sqlparse to version 0.6.0 or later, where this uncontrolled resource consumption issue has been fixed. No other mitigations are indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-08-06T19:56:23.725Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a8347d7bf8831d53948726a
Added to database: 08/17/2026, 17:41:43 UTC
Last enriched: 09/24/2026, 06:46:06 UTC
Last updated: 10/01/2026, 14:51:09 UTC
Views: 69
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.