CVE-2026-71491
NoneCVSS
—
EPSS
0.3%
Published
Aug 17, 2026
CISA due date
—
Cloudanix analysis
A bug in a Python tool that reads database commands lets attackers overload computers with extra work, slowing down or stopping services that rely on it.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The vulnerability allows an attacker to trigger quadratic time complexity in the comment grouping logic of sqlparse when parsing SQL statements containing only comments, leading to excessive CPU consumption via sqlparse.parse() and sqlparse.format() with strip_comments=True.
Why it matters to the business
Attackers can cause applications using sqlparse to become unresponsive or consume excessive server resources, potentially leading to service disruption across dependent systems.
How an attack unfolds
An attacker supplies a specially crafted SQL input consisting of many comment-only statements that repeatedly triggers rescans in group_comments before the MAX_GROUPING_TOKENS guard is reached, exhausting CPU through the public parse and format APIs.
How to fix it
Upgrade sqlparse to version 0.6.0 or later. For affected Red Hat discovery/discovery packages apply the update via server-rhel9:1788205779 (RHSA-2026:61783).
How to confirm the fix worked
Confirm sqlparse version is 0.6.0 or newer; test parsing of comment-heavy SQL inputs and verify CPU consumption remains linear rather than quadratic.
Typical attack path
- Locate an application endpoint or library call that invokes sqlparse.parse or sqlparse.format on untrusted SQL input
- Craft a payload containing a large number of comment-only statements designed to bypass early guards
- Submit the payload to trigger repeated rescanning and quadratic CPU usage
- Repeat or sustain the requests to maintain denial of service
How to detect it
Monitor Python processes for sustained high CPU usage during SQL parsing operations; inspect application logs for repeated calls to sqlparse with comment-heavy or malformed inputs.
What your security team should do
- Upgrade sqlparse to the fixed version in all environments
- Audit code paths that pass untrusted input to sqlparse.parse or format
- Implement input validation or rate limiting around SQL parsing functions
The record
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 packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-116668 Tanium addressed an uncontrolled resource consumption vulnerability in Discover. CWE-400
- CVE-2026-111751 Angular is a development platform for building mobile and desktop web applications using… CWE-400
- CVE-2026-111752 Angular is a development platform for building mobile and desktop web applications using… CWE-400
- CVE-2026-63476 isomorphic-git is a pure JavaScript implementation of Git for Node.js and browsers. CWE-400
- CVE-2026-121444 svg-sanitizer from 0.11.0 before 1.1.0 contains an algorithmic complexity denial of… CWE-400
- CVE-2026-121438 Mistune before 3.3.3 contains a denial of service vulnerability in… CWE-400
- CVE-2026-121404 FreeRDP before 3.32.2 contains a denial of service vulnerability in the shadow server… CWE-400
- CVE-2026-49924 In ShortcutInfo of ShortcutInfo.java, there is a possible way to crash the launcher via… CWE-400