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

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-71491— sqlparse: Quadratic O(n²) DoS in group_comments

Quick assessment

Affected
andialbrecht sqlparse
Exploitation
Public or AI PoC available; prioritize validation
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Andi Albrecht sqlparse是Andi Albrecht个人开发者的一个解析SQL语句的库。 Andi Albrecht sqlparse 0.6.0之前版本存在资源管理错误漏洞,该漏洞源于group_comments在MAX_GROUPING_TOKENS保护之前重复重新扫描仅注释语句,导致CPU消耗呈二次方增长。

CVSS 8.7 · High EPSS 0.26% · P18

Possible ATT&CK Techniques 1 AI

T1496 · Resource Hijacking

Affected Version Matrix 1

VendorProduct Version RangeStatus
andialbrecht sqlparse < 0.6.0 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-71491

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: Quadratic O(n²) DoS in group_comments
Source: CVE Program / CVE List V5
Vulnerability Description
sqlparse is a non-validating SQL parser module for Python. Prior to 0.6.0, group_comments in sqlparse/engine/grouping.py repeatedly rescans comment-only statements before the MAX_GROUPING_TOKENS guard, causing quadratic CPU consumption through sqlparse.parse() and sqlparse.format(sql, strip_comments=True). This issue is fixed in version 0.6.0.
Source: CVE Program / CVE List V5
CVSS Information
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
Source: CVE Program / CVE List V5
Vulnerability Type
未加控制的资源消耗(资源穷尽)
Source: CVE Program / CVE List V5
Vulnerability Title
Andi Albrecht sqlparse 资源管理错误漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Andi Albrecht sqlparse是Andi Albrecht个人开发者的一个解析SQL语句的库。 Andi Albrecht sqlparse 0.6.0之前版本存在资源管理错误漏洞,该漏洞源于group_comments在MAX_GROUPING_TOKENS保护之前重复重新扫描仅注释语句,导致CPU消耗呈二次方增长。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
andialbrecht sqlparse < 0.6.0 -

II. Public POCs for CVE-2026-71491

# POC Description Source Link Shenlong Link
AI-Generated POC Premium
Qwen3.6-35B-A3B · 7722 chars
Pro+ exclusive includes:
Vulnerability reproduction recording (real sandbox build + trigger, exclusive)
In-depth vulnerability mechanism
Trigger conditions & impact
Full executable POC code
Exploit chain & mitigation
POC zip download
100+ AI POC generations per month

III. Intelligence Information for CVE-2026-71491

登录查看更多情报信息。

Patches & Fixes for CVE-2026-71491 (1)

Vendor Advisories for CVE-2026-71491 (1)

Same Patch Batch · andialbrecht · 2026-08-17 · 4 CVEs total

CVE-2026-54284 8.7 HIGH sqlparse: TokenList.__init__ materializes O(subtree) value per group, causing CPU DoS befo
CVE-2026-59893 7.5 HIGH sqlparse: Inefficient Regex Handling of Dollar-Quoted SQL Literals Leads to ReDoS (Denial
CVE-2026-59894 6.2 MEDIUM sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped ba

IV. Related Vulnerabilities

V. Comments for CVE-2026-71491

No comments yet


Leave a comment