CVE-2026-84305
published 2026-09-01CVE-2026-84305: sqlparse is a non-validating SQL parser module for Python. Prior to 0.6.0, sqlparse.format(sql, reindent=True) and sqlformat --reindent route…
PriorityP427medium5.1CVSS 4.0
AVLACLATNPRNUINVCNVINVALSCNSINSANEXCRXIRXARXMAVXMACXMATXMPRXMUIXMVCXMVIXMVAXMSCXMSIXMSAXSXAUXRXVXREXUX
EPSS
0.19%
8.1th percentile
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.
Affected
190 ranges· showing 25
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| andialbrecht | sqlparse | < 0.6.0 | 0.6.0 |
| rhoso | openstack-aodh-api-rhel9 | — | — |
| rhoso | openstack-aodh-base-rhel9 | — | — |
| rhoso | openstack-aodh-evaluator-rhel9 | — | — |
| rhoso | openstack-aodh-listener-rhel9 | — | — |
| rhoso | openstack-aodh-notifier-rhel9 | — | — |
| rhoso | openstack-barbican-api-rhel9 | — | — |
| rhoso | openstack-barbican-base-rhel9 | — | — |
| rhoso | openstack-barbican-keystone-listener-rhel9 | — | — |
| rhoso | openstack-barbican-worker-rhel9 | — | — |
| rhoso | openstack-cinder-api-rhel9 | — | — |
| rhoso | openstack-cinder-backup-rhel9 | — | — |
| rhoso | openstack-cinder-base-rhel9 | — | — |
| rhoso | openstack-cinder-scheduler-rhel9 | — | — |
| rhoso | openstack-cinder-volume-rhel9 | — | — |
| rhoso | openstack-cloudkitty-api-rhel9 | — | — |
| rhoso | openstack-cloudkitty-base-rhel9 | — | — |
| rhoso | openstack-cloudkitty-processor-rhel9 | — | — |
| rhoso | openstack-designate-api-rhel9 | — | — |
| rhoso | openstack-designate-backend-bind9-rhel9 | — | — |
| rhoso | openstack-designate-base-rhel9 | — | — |
| rhoso | openstack-designate-central-rhel9 | — | — |
| rhoso | openstack-designate-mdns-rhel9 | — | — |
| rhoso | openstack-designate-producer-rhel9 | — | — |
| rhoso | openstack-designate-sink-rhel9 | — | — |
CVSS provenance
nvdv4.05.1MEDIUMCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vendor_redhat5.1MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
sqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumption
ghsa·2026-09-01
CVE-2026-84305 [MEDIUM] CWE-407 sqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumption
sqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumption
### Summary
When SQL is formatted with reindentation enabled, `ReindentFilter` repeatedly rebuilds prefixes of the current statement to calculate token offsets. An attacker who controls SQL sent to this opt-in formatting path can supply a parenthesized tuple list that remains just below the grouping-token cap. Thousands of offset calculations then traverse an expanding token tree, causing multi-second CPU consumption from an input of roughly 16 KB and degrading service availability.
### Details
`ReindentFilter._get_offset()` joins the tokens returned by `_flatten_up_to_token()` to calculate the current output position. Each call begins by flattening the current statement from its start and walks until the
Red Hat
sqlparse: sqlparse: Denial of Service via reindentation of tuple lists
vendor_redhat·2026-09-01·CVSS 5.1
CVE-2026-84305 [MEDIUM] CWE-770 sqlparse: sqlparse: Denial of Service via reindentation of tuple lists
sqlparse: sqlparse: Denial of Service via reindentation of tuple lists
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.
A flaw was found in sqlparse, a non-validating SQL parser module for Python. A remote attacker could exploit this by providing speci
No detection rules found.
No public exploits indexed.
https://github.com/andialbrecht/sqlparse/commit/a51df6d9e2d31b44be9adb6bc8732517db6bf96bhttps://github.com/andialbrecht/sqlparse/releases/tag/0.6.0https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-cfqr-cjx5-5jcmhttps://github.com/andialbrecht/sqlparse/security/advisories/GHSA-cfqr-cjx5-5jcm
2026-09-01
Published