PT-2026-84379 · Pypi · Sqlparse

CVE-2026-84305

·

Published

2026-08-13

·

Updated

2026-09-10

CVSS v4.0

5.1

Medium

VectorAV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions sqlparse versions prior to 0.6.0
Description An issue exists when SQL is formatted with reindentation enabled, where the ReindentFilter repeatedly rebuilds prefixes of the current statement to calculate token offsets. An attacker providing a crafted parenthesized tuple list can trigger thousands of offset calculations that traverse an expanding token tree. This results in quadratic CPU consumption, leading to request delays, reduced throughput, or worker starvation. The issue is triggered via the sqlparse.format(sql, reindent=True) function and the sqlformat --reindent command, specifically within the ReindentFilter. get offset() function and the flatten up to token() process in sqlparse/filters/reindent.py.
Recommendations Update sqlparse to version 0.6.0. As a temporary workaround, avoid using the reindent=True parameter in the sqlparse.format() function or the --reindent option in the sqlformat command when processing attacker-controlled input.

Exploit

Fix

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

BDU:2026-14129
CVE-2026-84305
GHSA-CFQR-CJX5-5JCM
OPENSUSE-SU-2026:21777-1
PYSEC-2026-3923

Affected Products

Sqlparse