BIT-sqlite-2026-119591: SQLite before 3.54.0 Stack Exhaustion via countOfViewOptimization() in VALUES Clause
SQLite before 3.54.0 contains a stack exhaustion vulnerability in countOfViewOptimization() that allows attackers to crash the host process via count() over a large multi-row VALUES clause. Attackers supplying SQL or a database file with a crafted view can trigger deeply nested TKPLUS expressions whose recursive freeing in sqlite3ExprDeleteNN() exhausts the C stack, causing denial of service.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
bitnami/sqliteto a version that resolves this vulnerability.Fixed in 3.54.0
Event History
Frequently Asked Questions
Who is exposed to this denial-of-service issue?
Host processes using SQLite before 3.54.0 are exposed when an attacker can supply SQL input or provide a database file containing a crafted view. The impact described is a crash of the host process.
What crafted input is needed to trigger the crash?
The trigger is a count(*) operation over a large multi-row VALUES clause, including through a crafted view. This creates deeply nested TK_PLUS expressions whose recursive cleanup can exhaust the C stack.
Is user interaction required for exploitation?
Yes. The supplied vector indicates user interaction is required. The attacker must also be able to get crafted SQL or a crafted database file processed by the affected host process.
What is the remediation?
Update SQLite to version 3.54.0 or later. The affected range is SQLite versions before 3.54.0.