# CVE-2026-84305: sqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumption

- Priority: **Routine**
- Reason: Not severe (CVSS 5.1, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-09-01 · Modified: 2026-09-01
- Aliases: SUSE-SU-2026:23634-1, SUSE-SU-2026:3978-1, SUSE-SU-2026:4109-1, SUSE-SU-2026:4145-1, GHSA-cfqr-cjx5-5jcm, PYSEC-2026-3923, UBUNTU-CVE-2026-84305, DEBIAN-CVE-2026-84305, CGA-5235-8c4v-9ff6, openSUSE-SU-2026:21777-1, CGA-45f4-fc2x-q8f8, CGA-fm45-86vh-cv44, CGA-hc3h-pr2h-9hxg, CGA-j475-833j-vx39
- Record: https://cvemate.com/vulnerability/CVE-2026-84305 · JSON: https://cvemate.com/vulnerability/CVE-2026-84305/json

## Description

```text
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.
```

## Signals

- CVSS: 5.1 medium (v4.0, CVE.org) 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.189%, percentile 8.9%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- andialbrecht sqlparse: \< 0.6.0
- chainguard dbt-bigquery (Chainguard): \< 1.10.3-r8
- chainguard dbt-core (Chainguard): \< 1.12.3-r0
- chainguard mlflow (Chainguard): \< 3.16.0-r0
- wolfi mlflow (Wolfi): \< 3.16.0-r0
- debian sqlparse (Debian): All versions (No fix recorded)
- ubuntu sqlparse (Ubuntu): All versions (No fix recorded)
- PyPI sqlparse (PyPI): \< 0.6.0
- opensuse python-sqlparse&distro=openSUSE Leap 16.0 (openSUSE): \< 0.5.3-160000.5.1
- suse python-sqlparse&distro=SUSE Linux Enterprise Module for Package Hub 15 SP7 (SUSE Linux Enterprise): \< 0.2.4-150100.6.14.1
- suse python-sqlparse&distro=SUSE Linux Enterprise Module for Public Cloud 15 SP4 (SUSE Linux Enterprise): \< 0.4.4-150400.6.19.1
- suse python-sqlparse&distro=SUSE Linux Enterprise Module for Public Cloud 15 SP5 (SUSE Linux Enterprise): \< 0.4.4-150400.6.19.1
- suse python-sqlparse&distro=SUSE Linux Enterprise Module for Public Cloud 15 SP6 (SUSE Linux Enterprise): \< 0.4.4-150600.3.12.1
- suse python-sqlparse&distro=SUSE Linux Enterprise Module for Python 3 15 SP7 (SUSE Linux Enterprise): \< 0.4.4-150600.3.12.1
- suse python-sqlparse&distro=SUSE Linux Enterprise Server 16.0 (SUSE Linux Enterprise): \< 0.5.3-160000.5.1
- suse python-sqlparse&distro=SUSE Linux Enterprise Server for SAP applications 16.0 (SUSE Linux Enterprise): \< 0.5.3-160000.5.1

## References

- <https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-cfqr-cjx5-5jcm>
- <https://github.com/andialbrecht/sqlparse/commit/a51df6d9e2d31b44be9adb6bc8732517db6bf96b>
- <https://github.com/andialbrecht/sqlparse/releases/tag/0.6.0>
- <https://www.suse.com/support/update/announcement/2026/suse-su-202623634-1/>
- <https://bugzilla.suse.com/1278097>
- <https://www.suse.com/security/cve/CVE-2026-84305>
- <https://www.suse.com/support/update/announcement/2026/suse-su-20263978-1/>
- <https://www.suse.com/support/update/announcement/2026/suse-su-20264109-1/>
- <https://www.suse.com/support/update/announcement/2026/suse-su-20264145-1/>
- <https://github.com/andialbrecht/sqlparse>
- <https://pypi.org/project/sqlparse>
- <https://github.com/advisories/GHSA-cfqr-cjx5-5jcm>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-84305>
- <https://ubuntu.com/security/CVE-2026-84305>
- <https://www.cve.org/CVERecord?id=CVE-2026-84305>
- <https://security-tracker.debian.org/tracker/CVE-2026-84305>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/84xxx/CVE-2026-84305.json>

---

Data as of 2026-12-05T04:44:31.379Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
