SQLite versions prior to 3.54.0 have a stack exhaustion vulnerability in the countOfViewOptimization() function. This flaw can be triggered by attackers using a crafted SQL query or database file with a view containing deeply nested TK_PLUS expressions in a large multi-row VALUES clause. The recursive freeing of these expressions leads to exhaustion of the C stack, causing the host process to crash and resulting in a denial of service condition. The issue is fixed in version 3.54.0.