Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. sqlparse
  4. ›
  5. CVE-2026-84305

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

September 1, 2026

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.

References

  • github.com/advisories/GHSA-cfqr-cjx5-5jcm
  • github.com/andialbrecht/sqlparse/commit/a51df6d9e2d31b44be9adb6bc8732517db6bf96b
  • github.com/andialbrecht/sqlparse/releases/tag/0.6.0
  • github.com/andialbrecht/sqlparse/security/advisories/GHSA-cfqr-cjx5-5jcm
  • nvd.nist.gov/vuln/detail/CVE-2026-84305

Code Behaviors & Features

Detect and mitigate CVE-2026-84305 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.6.0

Fixed versions

  • 0.6.0

Solution

Upgrade to version 0.6.0 or above.

Impact 4 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-407: Inefficient Algorithmic Complexity

Source file

pypi/sqlparse/CVE-2026-84305.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 02 Sep 2026 00:17:13 +0000.