cve.bz

CVE-2026-84305 andialbrecht sqlparse: Inefficient Algorithmic Complexity

5.1 mediumEPSS 0.2%Fix available

Medium (5.1) in andialbrecht sqlparse. EPSS 0.2% estimated probability of exploitation activity in the next 30 days. Fixed in sqlparse 0.6.0.

On this page
sqlparse is a non-validating SQL parser module for Python. Prior to 0.6.0, sqlparse.format(sql, reindent=True) and sqlformat --reindent route attacker-controlled parenthesized tuple lists through ReindentFilter._get_offset() in sqlparse/filters/reindent.py, where _flatten_up_to_token() repeatedly rebuilds and joins the statement prefix. Thousands of offset calculations walk an expanding token tree, producing quadratic CPU consumption for inputs that remain below MAX_GROUPING_TOKENS and causing request delays, reduced throughput, or worker starvation. This issue is fixed in version 0.6.0.

Severity

CVSS 4.0

5.1 medium
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 8th percentile. Scored 2026-11-24. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2026-09-01. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-407 Inefficient Algorithmic Complexity
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-84305 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-84305?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-84305?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-84305 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
andialbrecht sqlparse< 0.6.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-cfqr-cjx5-5jcmPyPIsqlparse<0.6.00.6.0
PYSEC-2026-3923PyPIsqlparse<0.6.00.6.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14sqlparseno fix listedDEBIAN-CVE-2026-84305
Ubuntu22.04:LTS, 24.04:LTS, 26.04:LTS and 4 moresqlparseno fix listedUBUNTU-CVE-2026-84305
SUSELinux Enterprise Module for Package Hub 15 SP7python-sqlparse0.2.4-150100.6.14.1SUSE-SU-2026:3978-1
SUSELinux Enterprise Module for Public Cloud 15 SP4, Linux Enterprise Module for Public Cloud 15 SP5python-sqlparse0.4.4-150400.6.19.1SUSE-SU-2026:4109-1
SUSELinux Enterprise Module for Public Cloud 15 SP6, Linux Enterprise Module for Python 3 15 SP7python-sqlparse0.4.4-150600.3.12.1SUSE-SU-2026:4145-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0python-sqlparse0.5.3-160000.5.1SUSE-SU-2026:23634-1
openSUSELeap 16.0python-sqlparse0.5.3-160000.5.1openSUSE-SU-2026:21777-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's 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.

Red Hat's 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.

ProductPackageStateAdvisory
Red Hat OpenStack Platform 13 (Queens)python-sqlparseNot affected
Red Hat OpenStack Platform 16.2python-sqlparseNot affected
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-aodh-apiNot affected
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-aodh-baseNot affected
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-aodh-evaluatorNot affected
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-aodh-listenerUnder investigation
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-aodh-notifierNot affected
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-barbican-apiUnder investigation
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-barbican-baseNot affected
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-barbican-keystone-listenerUnder investigation
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-barbican-workerUnder investigation
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-ceilometer-baseUnder investigation
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-ceilometer-centralUnder investigation
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-ceilometer-computeNot affected
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-ceilometer-ipmiNot affected
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-ceilometer-notificationNot affected
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-cinder-apiUnder investigation
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-cinder-backupUnder investigation
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-cinder-baseUnder investigation
Red Hat OpenStack Platform 16.2rhosp-rhel8/openstack-cinder-schedulerUnder investigation
180 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-84305.

References

Check your stackJSON