Skip to main content
CVE-2026-84305VulnerabilityPublished Updated

Prior to 0.6.0, sqlparse.format(sql, reindent=True) and sqlformat --reindent route attacker-controlled parenthesized

Affects sqlparseSource GCVE Database

0
Compare
Authoritative record:CVE-2026-84305· Medium 5.1

Not known to be exploited · CVSS 5.1 Medium · fixed in 0.6.0 : update sqlparse when convenient.

Data as of 24 Nov 2026, 21:25 UTC

CVSS 4.0 base score
5.1Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 0.6.0
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 1 Sep 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 24 Nov 2026.

What to do

Affected software

ProductAffectedFixed in
Ubuntu 26.10sqlparsepkg:deb/ubuntu/sqlparse?arch=source&distro=stonkingOther threatsAffected
  • =0.5.4-1
  • =0.5.5-2
  • =0.5.5-2ubuntu1
Fixed in–
Ubuntu 26.04 LTSsqlparsepkg:deb/ubuntu/sqlparse?arch=source&distro=resoluteOther threatsAffected
  • =0.5.3-1
  • =0.5.4-1
  • =0.5.4-1ubuntu0.1
Fixed in–
Ubuntu 24.04 LTSsqlparsepkg:deb/ubuntu/sqlparse?arch=source&distro=nobleOther threatsAffected
  • 0.4.2-1ubuntu1 – 0.4.4-1ubuntu0.2
4 affected builds
Fixed in–
Ubuntu 22.04 LTSsqlparsepkg:deb/ubuntu/sqlparse?arch=source&distro=jammyOther threatsAffected
  • 0.4.1-1ubuntu1 – 0.4.2-1ubuntu0.22.04.3
5 affected builds
Fixed in–
Ubuntu Pro 20.04 LTSsqlparsepkg:deb/ubuntu/sqlparse?arch=source&distro=esm-infra/focalOther threatsAffected
  • 0.2.4-1 – 0.2.4-3ubuntu0.1+esm1
6 affected builds
Fixed in–
Ubuntu Pro 18.04 LTSsqlparsepkg:deb/ubuntu/sqlparse?arch=source&distro=esm-infra/bionicOther threatsAffected
  • 0.2.2-1 – 0.2.4-0.1ubuntu0.1+esm1
4 affected builds
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

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.

References

Community reviews

Loading reviews…