Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

andialbrecht/sqlparse
master @ f80af6a
3
Fixes
2
CVEs
HIGH
Peak severity
66.7%
Coverage
Highlights
Denial of Service: 3 prior fixes. Scrutinize any change in this area.
sqlparse/engine/grouping.py: most-fixed (2 issues). Treat as high-risk during review.
2 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Denial of Service: Uncontrolled recursion and token accumulation during grouping operations can lead to stack exhaustion or severe CPU consumption. Hard recursion limits and strict error enforcement are required to preemptively abort parsing of maliciously nested structures.
Denial of Service: Processing deeply nested SQL statements can cause quadratic complexity or exponential CPU utilization (ReDoS) if token subtrees are recursively flattened repeatedly instead of referencing cached values.