CVE-2026-54284
published high CVSS 4.0 · 8.7sqlparse: TokenList.__init__ materializes O(subtree) value per group, causing CPU DoS before depth/token caps trigger
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| andialbrecht | — | sqlparse< 0.6.0 | Affected | Not stated | GitHub_M |
| Ubuntu | bionic | sqlparse | Advisory build | 0.2.4-0.1ubuntu0.1+esm1 | USN-8808-1 |
| SUSE / openSUSE | SLE-15-SP4 | python3-sqlparsenoarch | Advisory build | 0.4.2-150300.23.1 | SUSE-SU-2026:3906-1 |
| Ubuntu | focal | sqlparse | Advisory build | 0.2.4-3ubuntu0.1+esm1 | USN-8808-1 |
| Ubuntu | jammy | sqlparse | Advisory build | 0.4.2-1ubuntu0.22.04.3 | USN-8808-1 |
| Ubuntu | noble | sqlparse | Advisory build | 0.4.4-1ubuntu0.2 | USN-8808-1 |
| Ubuntu | resolute | sqlparse | Advisory build | 0.5.4-1ubuntu0.1 | USN-8808-1 |
| Ubuntu | xenial | sqlparse | Advisory build | 0.1.18-1ubuntu0.1~esm1 | USN-8808-1 |
Show 36 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | SLE-15-SP4 | python311-sqlparsenoarch | Advisory build | 0.4.4-150400.6.16.1 | SUSE-SU-2026:3910-1 |
| SUSE / openSUSE | SLE-15-SP5 | python3-sqlparsenoarch | Advisory build | 0.4.2-150300.23.1 | SUSE-SU-2026:3906-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-sqlparsenoarch | Advisory build | 0.4.4-150400.6.16.1 | SUSE-SU-2026:3910-1 |
| SUSE / openSUSE | SLE-15-SP6 | python3-sqlparsenoarch | Advisory build | 0.4.2-150300.23.1 | SUSE-SU-2026:3906-1 |
| SUSE / openSUSE | SLE-15-SP6 | python311-sqlparsenoarch | Advisory build | 0.4.4-150600.3.9.1 | SUSE-SU-2026:3907-1 |
| SUSE / openSUSE | SLE-15-SP7 | python2-sqlparsenoarch | Advisory build | 0.2.4-150100.6.11.1 | SUSE-SU-2026:3762-1 |
| SUSE / openSUSE | SLE-15-SP7 | python3-sqlparsenoarch | Advisory build | 0.4.2-150300.23.1 | SUSE-SU-2026:3906-1 |
| SUSE / openSUSE | SLE-15-SP7 | python311-sqlparsenoarch | Advisory build | 0.4.4-150600.3.9.1 | SUSE-SU-2026:3907-1 |
| SUSE / openSUSE | SLE-16 | python313-sqlparsenoarch | Advisory build | 0.5.3-160000.4.1 | SUSE-SU-2026:23561-1 |
| SUSE / openSUSE | SLE-3-SP7 | python311-sqlparsenoarch | Advisory build | 0.4.4-150600.3.9.1 | SUSE-SU-2026:3907-1 |
| SUSE / openSUSE | openSUSE-Leap-16.0 | python313-sqlparsenoarch | Advisory build | 0.5.3-160000.4.1 | OPENSUSE-SU-2026:21690-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-sqlparseaarch64 | Advisory build | 0.6.0-1.1 | OPENSUSE-SU-2026:11557-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-sqlparseppc64le | Advisory build | 0.6.0-1.1 | OPENSUSE-SU-2026:11557-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-sqlparses390x | Advisory build | 0.6.0-1.1 | OPENSUSE-SU-2026:11557-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-sqlparsex86_64 | Advisory build | 0.6.0-1.1 | OPENSUSE-SU-2026:11557-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-sqlparseaarch64 | Advisory build | 0.6.0-1.1 | OPENSUSE-SU-2026:11557-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-sqlparseppc64le | Advisory build | 0.6.0-1.1 | OPENSUSE-SU-2026:11557-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-sqlparses390x | Advisory build | 0.6.0-1.1 | OPENSUSE-SU-2026:11557-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-sqlparsex86_64 | Advisory build | 0.6.0-1.1 | OPENSUSE-SU-2026:11557-1 |
| Ubuntu | bionic | pypy-sqlparse | Advisory build | 0.2.4-0.1ubuntu0.1+esm1 | USN-8808-1 |
| Ubuntu | bionic | python-sqlparse | Advisory build | 0.2.4-0.1ubuntu0.1+esm1 | USN-8808-1 |
| Ubuntu | bionic | python3-sqlparse | Advisory build | 0.2.4-0.1ubuntu0.1+esm1 | USN-8808-1 |
| Ubuntu | bionic | sqlformat | Advisory build | 0.2.4-0.1ubuntu0.1+esm1 | USN-8808-1 |
| Ubuntu | focal | pypy-sqlparse | Advisory build | 0.2.4-3ubuntu0.1+esm1 | USN-8808-1 |
| Ubuntu | focal | python3-sqlparse | Advisory build | 0.2.4-3ubuntu0.1+esm1 | USN-8808-1 |
| Ubuntu | focal | sqlformat | Advisory build | 0.2.4-3ubuntu0.1+esm1 | USN-8808-1 |
| Ubuntu | jammy | python3-sqlparse | Advisory build | 0.4.2-1ubuntu0.22.04.3 | USN-8808-1 |
| Ubuntu | jammy | sqlformat | Advisory build | 0.4.2-1ubuntu0.22.04.3 | USN-8808-1 |
| Ubuntu | noble | python3-sqlparse | Advisory build | 0.4.4-1ubuntu0.2 | USN-8808-1 |
| Ubuntu | noble | sqlformat | Advisory build | 0.4.4-1ubuntu0.2 | USN-8808-1 |
| Ubuntu | resolute | python3-sqlparse | Advisory build | 0.5.4-1ubuntu0.1 | USN-8808-1 |
| Ubuntu | resolute | sqlformat | Advisory build | 0.5.4-1ubuntu0.1 | USN-8808-1 |
| Ubuntu | xenial | pypy-sqlparse | Advisory build | 0.1.18-1ubuntu0.1~esm1 | USN-8808-1 |
| Ubuntu | xenial | python-sqlparse | Advisory build | 0.1.18-1ubuntu0.1~esm1 | USN-8808-1 |
| Ubuntu | xenial | python3-sqlparse | Advisory build | 0.1.18-1ubuntu0.1~esm1 | USN-8808-1 |
| Ubuntu | xenial | sqlformat | Advisory build | 0.1.18-1ubuntu0.1~esm1 | USN-8808-1 |
Description
sqlparse is a non-validating SQL parser module for Python. Prior to 0.6.0, TokenList construction and string conversion in sqlparse/sql.py repeatedly flatten nested token subtrees constructed by group_parenthesis and group_case, causing quadratic CPU consumption through sqlparse.parse(), sqlparse.format(), and sqlparse.split() before depth and token limits terminate processing. This issue is fixed in version 0.6.0.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.7 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| andialbrecht | sqlparse | < 0.6.0 (affected) | GitHub_M · cna |
Weaknesses
2- CWE-407 CWE-407: Inefficient Algorithmic Complexity
- CWE-1333 CWE-1333: Inefficient Regular Expression Complexity
References
2Provider assertions
2GitHub_M · cna
sqlparse: TokenList.__init__ materializes O(subtree) value per group, causing CPU DoS before depth/token caps trigger
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 8830b1535b00b80d3136ae0f144f15502a22ef3f31c3cf4e5a95ec483ec8f823
- Ingested
- 23 Sep 2026, 09:20:18 UTC
- Source record
- Official CVE record