# CVE-2026-54284: sqlparse: TokenList.\_\_init\_\_ materializes O(subtree) value per group, causing CPU DoS before depth/token caps trigger

- Priority: **Prioritise**
- Reason: Severe, CVSS 8.7 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 0% (FIRST, 04-12-2026)
- Next step: Check applicability: affected before 0.6.0 (CNA); fix release not confirmed
- Status: published
- Published: 2026-08-17 · Modified: 2026-08-17
- Aliases: GHSA-pwgv-4x5q-6m9f, PYSEC-2026-3699, UBUNTU-CVE-2026-54284, DEBIAN-CVE-2026-54284, CGA-3gv2-hq9c-9mfg, CGA-45c5-9fmv-8wjm, CGA-6j4q-9m3h-3hhm, CGA-98wq-2wm5-qwrm, CGA-hq7x-5m6f-r2cr, CGA-hxwx-m9c3-686g, CGA-mvcc-44mf-5g66, CGA-xfcm-pc35-mqwm, CGA-xxhf-r898-w225, CGA-25rg-74qx-q55f, CGA-295h-vv9r-h5xc, CGA-2jr3-pmhh-58m3, CGA-2qm7-2mgf-h85q, CGA-2rwf-xxxm-633j, CGA-375m-r398-3423, CGA-37p2-7whj-9xw8, CGA-383g-fqm2-9j9r, CGA-3h7m-vvwf-h7xp, CGA-42gx-2w97-85vh, CGA-43c5-cqqp-qm5p, CGA-445r-gh7h-pxm2, CGA-4f7p-f3xh-2r39, CGA-4fc3-7c2q-xwrf, CGA-4gv3-365q-gmhq, CGA-4gwr-g936-93qc, CGA-4pxr-mxg9-c2hj, CGA-598p-mr5v-qw75, CGA-5jjh-mv7v-jmw3, CGA-63gj-rvmv-jvj7, CGA-68g7-99xq-pmj3, CGA-6987-pj4h-vhcx, CGA-6j79-2vwc-v5q9, CGA-6rx9-7j7x-2f9c, CGA-7245-q5p8-gxm5, CGA-74x8-fpc4-chr4, CGA-76c5-72jw-hj7h, CGA-786g-jmwq-jpcw, CGA-78hw-2hq7-2cv3, CGA-7hm5-5v9w-8qvm, CGA-7v4r-ffqj-g345, CGA-8227-4g3w-9fcx, CGA-85cc-xqg2-29r6, CGA-8cp5-55mc-j2gr, CGA-8pp7-phqv-j49v, CGA-937v-82jh-vq33, CGA-9384-cxjf-pc9m, CGA-93j8-398f-4rrj, CGA-9475-2jx7-rmxg, CGA-9834-jpgr-w9mj, CGA-9gmj-ffq4-pf52, CGA-9hfx-xf8v-5j86, CGA-9hgv-qq5g-2mqf, CGA-9jv8-8m2x-5mw2, CGA-9q9g-v2m3-mhfv, CGA-9w43-v4x5-8ghp, CGA-9xcm-h258-m7p7, CGA-9xx9-hmxp-hj65, CGA-c392-cxrw-grwm, CGA-c3mr-x9v8-mfhg, CGA-c877-8ccw-5h2j, CGA-c93g-9f9q-hm98, CGA-cfv2-m2g2-w7qr, CGA-cfwq-4vfh-cgm5, CGA-cp73-58mr-cjwm, CGA-cp97-q629-wp3g, CGA-cv68-jfq3-g9rm, CGA-f23m-64v4-9h87, CGA-f3cg-h8f9-469j, CGA-f6mv-6rp5-qm74, CGA-ff8f-vpvj-hqhw, CGA-fffm-v8x3-3v7w, CGA-g424-g49m-7vfv, CGA-g847-qvx8-j2mf, CGA-gh7w-v39q-72h3, CGA-gj56-6mq3-9qw7, CGA-gmxw-m9jv-7v3q, CGA-gq2m-3778-pwxh, CGA-gwwp-fjvg-qr54, CGA-h7c3-6fhf-4vqx, CGA-h82x-v7x8-g2m9, CGA-h8qq-xf9w-3wjg, CGA-hhg7-jvwh-5pcm, CGA-hr2r-7xx5-9pwp, CGA-hr86-jhrj-5476, CGA-hvmh-26x4-mxrp, CGA-j24q-w3vg-6r3f, CGA-j6vj-9jg9-3677, CGA-jfxq-j7fq-xfv2, CGA-jvgm-g5rc-qc9v, CGA-m5c8-rg78-62fc, CGA-m5hh-56q8-gmrh, CGA-m9qx-33m2-v2h7, CGA-mg7c-29w8-29cg, CGA-mv7f-x662-722q, CGA-mxj7-4h47-73x8, CGA-p644-9xh7-cpw4, CGA-pfqw-qrf3-g9pj, CGA-pj4f-f9v8-44f9, CGA-pm4m-mq2r-wv74, CGA-pq93-26rv-pj7j, CGA-qr5j-6jc4-fwj8, CGA-r8m9-wqqr-2pj2, CGA-rcf4-v2r3-5v49, CGA-rg7j-hhrx-85xp, CGA-rgcw-q9qv-x76m, CGA-rp57-4c88-phcg, CGA-rp9p-frv6-wrg5, CGA-rwqr-pmjm-2gm9, CGA-v6wc-9gh5-j685, CGA-vc4p-hq2f-m8wg, CGA-vhf4-8x3g-h659, CGA-vv8f-wj4p-3q48, CGA-vw74-cg8c-g95g, CGA-vw8c-g84c-j9hr, CGA-vxv9-7qvr-9w3p, CGA-x298-4wpm-4q6c, CGA-x36r-cc6j-vpgr, CGA-x969-j39p-f682, CGA-xr3j-49fp-8vhp, CGA-xxv8-xj58-mp52
- Record: https://cvemate.com/vulnerability/CVE-2026-54284 · JSON: https://cvemate.com/vulnerability/CVE-2026-54284/json

## Description

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

## Signals

- CVSS: 8.7 high (v4.0, CVE.org) 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
- EPSS: 0.332%, percentile 28.459%, 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 (first 20 of 68)

- andialbrecht sqlparse: \< 0.6.0
- chainguard airflow-2 (Chainguard): \< 2.11.2-r16
- chainguard airflow-3 (Chainguard): \< 3.3.1-r3
- chainguard airflow-3-iamguarded-compat (Chainguard): All versions (No fix recorded)
- chainguard airflow-core-2 (Chainguard): \< 2.11.2-r7
- chainguard apache-beam-python-3.14-sdk (Chainguard): \< 2.75.0-r2
- chainguard authentik-2025.12 (Chainguard): \< 2025.12.6-r8
- chainguard authentik-2026.2 (Chainguard): \< 2026.2.6-r16
- chainguard authentik-2026.5 (Chainguard): \< 2026.5.6-r9
- chainguard authentik-fips-2025.12 (Chainguard): \< 2025.12.6-r9
- chainguard authentik-fips-2026.2 (Chainguard): \< 2026.2.6-r16
- chainguard authentik-fips-2026.5 (Chainguard): \< 2026.5.6-r10
- chainguard datahub-ingestion (Chainguard): \< 1.7.0-r2
- chainguard datahub-ingestion-fips (Chainguard): \< 1.7.0-r2
- chainguard dbt-bigquery (Chainguard): \< 1.10.3-r8
- chainguard dbt-core (Chainguard): \< 1.12.3-r0
- chainguard label-studio (Chainguard): \< 1.23.0-r12
- chainguard mlflow (Chainguard): \< 3.15.1-r4 \| \< 3.16.0-r0
- chainguard mlflow-fips (Chainguard): \< 3.15.1-r3
- chainguard mycli (Chainguard): \< 2.16.0-r1

## References

- <https://github.com/andialbrecht/sqlparse/security/advisories/GHSA-pwgv-4x5q-6m9f>
- <https://github.com/andialbrecht/sqlparse/commit/939b129e24c0ad5d51368b1aa72fffcaca76f06f>
- <https://github.com/andialbrecht/sqlparse>
- <https://pypi.org/project/sqlparse>
- <https://github.com/advisories/GHSA-pwgv-4x5q-6m9f>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-54284>
- <https://ubuntu.com/security/CVE-2026-54284>
- <https://www.cve.org/CVERecord?id=CVE-2026-54284>
- <https://ubuntu.com/security/notices/USN-8808-1>
- <https://security-tracker.debian.org/tracker/CVE-2026-54284>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54284.json>

---

Data as of 2026-12-05T04:47:19.350Z. 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
