CVE-2026-84305

Description

A flaw was found in sqlparse, a non-validating SQL parser module for Python. A remote attacker could exploit this by providing specially crafted parenthesized tuple lists. When these lists are reindentated, the software performs numerous offset calculations, leading to quadratic CPU consumption. This can result in denial of service, causing request delays, reduced throughput, or worker starvation.

Statement

A denial of service vulnerability was found in sqlparse, a Python SQL parser library. When sqlparse.format() is invoked with the reindent=True option, processing specially crafted parenthesized tuple lists triggers quadratic CPU consumption due to repeated token tree traversal during offset calculation. This can cause request delays, reduced throughput, or worker starvation in applications that expose SQL formatting with reindentation to user input. Red Hat products are not affected by this vulnerability as they do not invoke the vulnerable code path - the reindent parameter is only used in Django's test debugging functionality, which is not present in production deployments.

Mitigation

For general mitigation guidance: Avoid using sqlparse.format() with reindent=True on untrusted input. If SQL formatting is required, either disable reindentation or implement request size limits and timeouts to prevent resource exhaustion. Update to sqlparse 0.6.0 or later, which fixes the quadratic behavior. Note that Red Hat products do not require mitigation as they do not use the vulnerable functionality.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score6.2N/AN/A
Attack VectorLocalN/AN/A
Attack ComplexityLowN/AN/A
Privileges RequiredNoneN/AN/A
User InteractionNoneN/AN/A
ScopeUnchangedN/AN/A
ConfidentialityNoneN/AN/A
Integrity ImpactNoneN/AN/A
Availability ImpactHighN/AN/A

Vector

Red Hat: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Understanding the Weakness (CWE)

Availability

Technical Impact: DoS: Resource Consumption (CPU); DoS: Resource Consumption (Memory); DoS: Resource Consumption (Other)

When allocating resources without limits, an attacker could prevent other systems, applications, or processes from accessing the same type of resource. It can be easy for an attacker to consume many resources by rapidly making many requests or causing larger resources to be used than is needed.

Frequently Asked Questions

Want to get errata notifications? Sign up here.