Description
SQLite before 3.54.0 contains a stack exhaustion vulnerability that allows attackers to bypass the SQLITE_LIMIT_EXPR_DEPTH nesting limit because common table expressions are not counted against it. Attackers can supply a WITH clause chaining tens of thousands of CTEs, via plain SQL or a view in an untrusted database file, causing unbounded selectExpander() recursion that crashes the process.
Published: 2026-10-30
Score: 6.8 Medium
EPSS: n/a
KEV: No
Impact: Denial of Service via stack exhaustion
Action: Patch Immediately
AI Analysis

Impact

SQLite prior to version 3.54.0 contains a stack exhaustion flaw in the selectExpander() routine where common table expressions are not counted against the SQLITE_LIMIT_EXPR_DEPTH limit. An attacker can craft a WITH clause that chains thousands of CTEs, either supplied as raw SQL or through a view in an untrusted database file, which forces unbounded recursion and ultimately crashes the SQLite process. The vulnerability is therefore a denial‑of‑service condition triggered by excessive recursion. The weakness corresponds to CWE‑674, uncontrolled recursion.

Affected Systems

The flaw affects all SQLite releases earlier than 3.54.0. Any system that embeds SQLite and can load untrusted database files or accepts arbitrary SQL statements is susceptible, including applications on desktop, mobile, or embedded platforms that use SQLite as the storage engine. The vendor’s product line is SQLite:SQLite, and the affected range is all versions less than 3.54.0.

Risk and Exploitability

The CVSS base score is 6.8, indicating a moderate severity. No EPSS score is available and the vulnerability is not listed in the CISA KEV catalog, so no evidence of active exploitation is known. The likely attack vector is the ability to supply a malicious SQL statement or load a malicious database file containing a deep CTE chain. Once the vulnerable code path is executed, the process terminates, leading to a denial of service for the application. Due to the absence of a validated exploit and the relatively moderate score, the risk is moderate, but the impact of a crash can be significant for high‑availability services.

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

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to SQLite 3.54.0 or later, which fixes the CTE recursion limitation.
  • Limit or sanitize incoming SQL to prevent construction of large WITH‑clause chains, especially when processing untrusted database files.
  • If possible, configure SQLITE_LIMIT_EXPR_DEPTH to a stricter value to reduce stack usage on older releases.
  • Validate the integrity of database files before loading them into the application.

Generated by OpenCVE AI on October 30, 2026 at 12:28 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 that allows attackers to bypass the SQLITE_LIMIT_EXPR_DEPTH nesting limit because common table expressions are not counted against it. Attackers can supply a WITH clause chaining tens of thousands of CTEs, via plain SQL or a view in an untrusted database file, causing unbounded selectExpander() recursion that crashes the process.
Title SQLite before 3.54.0 Stack Exhaustion via CTE Chain in selectExpander()
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:30:37.740Z

Reserved: 2026-10-30T00:39:31.960Z

Link: CVE-2026-119371

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

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

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

Link: CVE-2026-119371

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-30T12:30:14Z

Weaknesses