Cloudanix VulnDB

CVE-2026-59893

High · 7.5

CVSS

7.5

EPSS

0.3%

Published

Aug 17, 2026

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in a Python SQL parsing library lets an attacker send specially crafted text that makes the program use far more processing power than expected, potentially slowing 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

Repeated linear scans over unmatched dollar-quoted literals and multiline comment delimiters in SQL_REGEX and the lexer position loop produce quadratic CPU usage when sqlparse.parse, format, or split are called on crafted input.

Why it matters to the business

Applications that parse untrusted SQL can experience sudden CPU exhaustion, leading to service slowdowns or outages; the Red Hat package requires the RHSA-2026:61783 update and has been exposed for 70 days.

How an attack unfolds

An attacker supplies a single SQL string containing a large number of unmatched dollar-quote or comment delimiters; each call to the parser triggers repeated rescanning of the same prefixes, driving CPU to 100% and denying service to legitimate requests.

How to fix it

Upgrade sqlparse to version 0.6.0 or later; for Red Hat systems apply the server-rhel9:1788205779 update referenced in RHSA-2026:61783.

How to confirm the fix worked

Confirm the installed sqlparse version is 0.6.0 or newer; run a benchmark with a crafted payload containing 10 000 unmatched dollar quotes and verify CPU time remains linear.

Typical attack path

  1. Identify an entry point that invokes sqlparse.parse, format, or split on attacker-controlled SQL.
  2. Craft input containing thousands of unmatched dollar-quoted or multiline-comment delimiters.
  3. Submit the payload to trigger the quadratic loop in lexer.py.
  4. Observe sustained high CPU usage and service degradation or crash.

How to detect it

Monitor process CPU and memory metrics for sudden spikes correlated with sqlparse calls; review application logs for parse/format/split operations on unusually long or malformed SQL strings.

What your security team should do

  • Apply the Red Hat RHSA-2026:61783 update or upgrade sqlparse to 0.6.0 within 30 days.
  • Add dependency pinning and automated scanning to prevent future vulnerable versions from being introduced.
  • Review any code paths that parse SQL originating from external or user-controlled sources.

The record

sqlparse is a non-validating SQL parser module for Python. Prior to 0.6.0, SQL_REGEX in sqlparse/keywords.py and the per-position loop in sqlparse/lexer.py repeatedly scan unmatched dollar-quoted literal and multiline-comment delimiters, causing quadratic CPU consumption through sqlparse.parse(), sqlparse.format(), and sqlparse.split(). This issue is fixed in version 0.6.0.

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities