CVE-2026-84305sqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumption
Updated under an hour ago ()
Does this affect you?
It affects andialbrecht sqlparse. Add what you run to find out whether that includes you.
No exploitation reported and no EPSS estimate yet.
Do this next
Free account, 1 product
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.
- CVSS
- 5.1 MEDIUM (v4.0, CNA)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
- Weakness (CWE)
- CWE-407
- Known exploited
- Not in CISA's KEV catalog
- EPSS (exploitation in the next 30 days)
- Not loaded for this CVE
- Assigned by
- GitHub_M
- NVD analysis
- Deferred
- Record last updated
- Sep 1, 2026
- First seen by InfoSec Signals
- Oct 9, 2026
Affected products
andialbrecht sqlparse andialbrecht:sqlparse (from the name) | before 0.6.0 | CNA record |
References
- https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-cfqr-cjx5-5jcmx-refsource-confirm
- https://github.com/andialbrecht/sqlparse/commit/a51df6d9e2d31b44be9adb6bc8732517db6bf96bx-refsource-misc
- https://github.com/andialbrecht/sqlparse/releases/tag/0.6.0x-refsource-misc
The CVE record on cve.org NVD's entry
The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.