SQLite versions prior to 3.54.0 have a stack exhaustion vulnerability due to improper counting of common table expressions (CTEs) against the SQLITE_LIMIT_EXPR_DEPTH nesting limit. An attacker can exploit this by supplying a WITH clause chaining tens of thousands of CTEs, causing unbounded recursion in the selectExpander() function and crashing the process.