Fedora Account System
Red Hat Associate
Red Hat Customer
A vulnerability was found in SQLite's SQL parser. A VALUES clause with many rows combined with a WITH (CTE) clause forces a UNION ALL compound-SELECT fallback. The compound-SELECT depth limit is bypassed when SF_Values is set, creating an arbitrarily deep AST. When expression depth limits reject the tree, recursive cleanup could overflow the stack. The fix makes clearSelect() iterate the pPrior chain instead of recursing. PoC: https://github.com/abraxas/sqlite-values-union Fixed in SQLite 3.54.0 (fix in src/select.c — clearSelect() now iterative).