CVE-2026-71491
sqlparse: sqlparse: Denial of Service via quadratic CPU consumption in comment grouping
Overview
Description
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.
Source: OX vulnerability database
Severity
7.5 · HIGH
CVSS 3.1 base score, scored by redhat.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness: CWE-400, CWE-407
Affected packages · 3
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| PyPI | sqlparse | <0.6.0 | 0.6.0 |
| Seal PyPI | seal-sqlparse | >=0.4.3+sp1, <0.4.3+sp999>=0.4.4+sp1, <0.4.4+sp999 | 0.4.3+sp9990.4.4+sp999 |
| Seal PyPI | sqlparse | >=0.4.3+sp0, <0.4.3+sp999>=0.4.4+sp0, <0.4.4+sp999 | 0.4.3+sp9990.4.4+sp999 |
Open a package to see all its vulnerabilities.
Operating systems · 77 fixes
Red Hat 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 7 | openshift4-ose-ironic-rhel9 +2 | affected |
| 8 | openshift4-ose-ironic-rhel9 +82 | affected |
| 9 | openshift4-ose-ironic-rhel9 +75 | affected |
SUSE Linux Enterprise 5 releases · 4 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 15.4 | python3-sqlparse | 0.4.2-150300.23.1 | SUSE-SU-2026:3906-1 |
| 15.4 | python311-sqlparse | 0.4.4-150400.6.16.1 | SUSE-SU-2026:3910-1 |
| 15.5 | python3-sqlparse | 0.4.2-150300.23.1 | SUSE-SU-2026:3906-1 |
| 15.5 | python311-sqlparse | 0.4.4-150400.6.16.1 | SUSE-SU-2026:3910-1 |
| 15.6 | python3-sqlparse | 0.4.2-150300.23.1 | SUSE-SU-2026:3906-1 |
| 15.6 | python311-sqlparse | 0.4.4-150600.3.9.1 | SUSE-SU-2026:3907-1 |
4 more rows
chainguard 1 release · 46 packages
| Release | Package | Fixed in |
|---|---|---|
| dbt-bigquery | 1.10.3-r8 | |
| dbt-core | 1.12.3-r0 | |
| label-studio | 1.23.0-r12 | |
| datahub-ingestion +1 | 1.7.0-r2 | |
| openstack-placement-2025-1-fips | 13.0.0_git20260720-r2 | |
| openstack-placement-2025-1 | 13.0.0_git20260720-r3 |
40 more rows
debian 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | sqlparse | affected |
| 12 | sqlparse | affected |
| 13 | sqlparse | affected |
| 14 | sqlparse | affected |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| sqlparse | affected |
minimos 1 release · 4 packages
| Release | Package | Fixed in |
|---|---|---|
| py3-sqlparse | 0.6.0-r0 | |
| label-studio | 1.23.1-r0 | |
| mlflow | 3.15.2-r0 | |
| airflow-3 | 3.3.2-r0 |
openSUSE 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | python313-sqlparse +1 | 0.6.0-1.1 | openSUSE-SU-2026:11557-1 |
openSUSE Leap 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 16.0 | python313-sqlparse | 0.5.3-160000.4.1 | openSUSE-SU-2026:21690-1 |
ubuntu 5 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 18.04-ESM | sqlparse | 0.2.4-0.1ubuntu0.1+esm1 |
| 20.04-ESM | sqlparse | 0.2.4-3ubuntu0.1+esm1 |
| 22.04 | sqlparse | 0.4.2-1ubuntu0.22.04.3 |
| 24.04 | sqlparse | 0.4.4-1ubuntu0.2 |
| 26.04 | sqlparse | 0.5.4-1ubuntu0.1 |
wolfi 1 release · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| mycli | 2.16.0-r1 | |
| airflow-3 | 3.3.1-r3 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2026-71491
- github.com https://github.com/andialbrecht/sqlparse
- github.com https://github.com/andialbrecht/sqlparse/commit/ef2012a5eeb491e604dea2b00d516904a3830c87
- github.com https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-f2ff-p2ww-7p4p
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2026-71491
- ubuntu.com https://ubuntu.com/security/notices/USN-8808-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2026-71491
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.