Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

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

Quick assessment

Affected
andialbrecht sqlparse
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

sqlparse 是一个用于 Python 的非验证型 SQL 解析器模块。在 0.6.0 版本之前,调用 或使用 时,攻击者控制的带括号的元组列表会经过 中 函数处理。其中, 会反复重建并拼接语句前缀。大量的偏移量计算会遍历不断扩展的令牌树,导致对未超过 的输入产生二次方级的 CPU 消耗,从而引发请求延迟、吞吐量下降或工作进程饥饿。该问题已在版本 0.6.0 中修复。

CVSS 5.1 · Medium
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-84305

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
sqlparse: Reindentation of tuple lists causes near-cap quadratic CPU consumption
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
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
Source: CVE Program / CVE List V5
Vulnerability Type
算法复杂性
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
andialbrecht sqlparse < 0.6.0 -

II. Public POCs for CVE-2026-84305

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-84305

登录查看更多情报信息。

Other References for CVE-2026-84305 (3)

IV. Related Vulnerabilities

V. Comments for CVE-2026-84305

No comments yet


Leave a comment