Cloudanix VulnDB

CVE-2026-71491

None

CVSS

—

EPSS

0.3%

Published

Aug 17, 2026

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

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

  1. Locate an application endpoint or library call that invokes sqlparse.parse or sqlparse.format on untrusted SQL input
  2. Craft a payload containing a large number of comment-only statements designed to bypass early guards
  3. Submit the payload to trigger repeated rescanning and quadratic CPU usage
  4. 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