Description
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 TK_PLUS expressions whose recursive freeing in sqlite3ExprDeleteNN() exhausts the C stack, causing denial of service.
Published: 2026-10-30
Score: 6.8 Medium
EPSS: n/a
KEV: No
Impact: Denial of Service
Action: Patch
AI Analysis

Impact

SQLite before version 3.54.0 contains a stack exhaustion flaw in the countOfViewOptimization() routine. When an attacker executes a count(*) over a large multi‑row VALUES clause, deeply nested TK_PLUS expressions are created and freed recursively in sqlite3ExprDeleteNN(), overwhelming the C stack and causing the host process to crash. The result is a denial of service – the database engine stops accepting further requests until it is restarted.

Affected Systems

The issue affects the SQLite engine, specifically all builds prior to release 3.54.0. Any deployment using SQLite 3.53.x or earlier is susceptible, regardless of operating system or packaging.

Risk and Exploitability

The CVSS score of 6.8 places the flaw in the medium severity range, while no EPSS value is available for this vulnerability. It is not listed in CISA's KEV catalog. The exploit requires the attacker to supply crafted SQL or a database file containing a malicious view that triggers the vulnerable countOfViewOptimization() logic. This suggests that attackers with SQL injection or file upload capabilities can deliver the payload, making the attack vector likely through application‑level input but it is inferred rather than explicitly documented in the description.

Generated by OpenCVE AI on October 30, 2026 at 12:35 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to SQLite 3.54.0 or later to apply the official fix
  • If an immediate upgrade is not possible, avoid using count(*) on large multi‑row VALUES clauses or limit the number of rows processed
  • Validate or sanitize view definitions and user input to prevent injection of malicious SQL before it reaches the database engine

Generated by OpenCVE AI on October 30, 2026 at 12:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 30 Oct 2026 11:45:00 +0000

Type Values Removed Values Added
Description 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 TK_PLUS expressions whose recursive freeing in sqlite3ExprDeleteNN() exhausts the C stack, causing denial of service.
Title SQLite before 3.54.0 Stack Exhaustion via countOfViewOptimization() in VALUES Clause
First Time appeared Sqlite
Sqlite sqlite
Weaknesses CWE-674
CPEs cpe:2.3:a:sqlite:sqlite:*:*:*:*:*:*:*:*
Vendors & Products Sqlite
Sqlite sqlite
References
Metrics cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'}

cvssV4_0

{'score': 6.8, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-30T11:31:15.714Z

Reserved: 2026-10-30T11:20:35.123Z

Link: CVE-2026-119591

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-30T12:16:44.873

Modified: 2026-10-30T12:16:44.873

Link: CVE-2026-119591

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-30T13:15:15Z

Weaknesses