CVE-2026-71491
Description
A flaw was found in sqlparse, a Python module for parsing SQL. A remote attacker could exploit this vulnerability by providing specially crafted SQL input that contains numerous comment-only statements. This could cause the group_comments function to repeatedly rescan these statements, leading to excessive CPU consumption and a Denial of Service (DoS) for the application using the parser.
Statement
A flaw was found in sqlparse, a non-validating SQL parser module for Python, and is rated by Red Hat as having IMPORTANT severity (CVSS 3.1 base score of 7.5). The group_comments function in sqlparse/engine/grouping.py repeatedly rescans comment-only statements before the MAX_GROUPING_TOKENS guard is applied, so SQL input containing numerous comment-only statements causes quadratic CPU consumption when processed through sqlparse.parse() or sqlparse.format(sql, strip_comments=True). A remote attacker who can supply specially crafted SQL input to an application that parses it with sqlparse could exploit this flaw to cause excessive CPU consumption, resulting in a denial of service of the application; confidentiality and integrity are not affected. This flaw affects Red Hat products that ship the vulnerable sqlparse package, including Red Hat OpenStack Platform, Red Hat OpenShift Container Platform, Ansible Automation Platform, Red Hat OpenShift AI, and other offerings; a fix is being pursued by the responsible product teams (delegated resolution). The upstream record assigns a CVSS 4.0 score of 8.7, while Red Hat's CVSS 3.1 score is 7.5; both ratings are IMPORTANT and reflect availability-only impact, with the numeric difference stemming from the CVSS version used.
Mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
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).
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 7.5 | N/A | N/A |
| Attack Vector | Network | N/A | N/A |
| Attack Complexity | Low | N/A | N/A |
| Privileges Required | None | N/A | N/A |
| User Interaction | None | N/A | N/A |
| Scope | Unchanged | N/A | N/A |
| Confidentiality | None | N/A | N/A |
| Integrity Impact | None | N/A | N/A |
| Availability Impact | High | N/A | N/A |
Vector
Red Hat: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.