Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply untrusted SQL or crafted database file
-
ExploitChain tens of thousands of nested CTEs
-
ExecutionTrigger unbounded selectExpander() recursion
-
ImpactExhaust stack and crash process
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
|
| Exploitation Conditions | Exploitation requires the SQLite process to parse attacker-controlled SQL containing a WITH clause that chains tens of thousands of CTEs, OR to open an untrusted SQLite database file containing a view with that nesting. The root condition is that, before 3.54.0, common table expressions were not counted against SQLITE_LIMIT_EXPR_DEPTH, so that configured nesting limit provides no protection. Limiting factors that reduce realistic risk: the attack is local (the malicious input must be delivered to the SQLite process, not sent over a network to default installs), it requires passive user interaction in the sense that the victim application must accept and process the untrusted SQL text or database file, and impact is confined to a process crash (availability only) with no code execution or data exposure. Deployments that only ever execute trusted, application-authored SQL and never open untrusted database files are not exposed. |
| Impact | This is a medium-severity denial-of-service issue, not a priority emergency. The supplied CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H, score 6.8) tells a consistent story: the only impact is availability (VA:H) - a process crash via stack exhaustion (CWE-674) - with no confidentiality or integrity effect, and the attack vector is local, meaning the malicious SQL or database file must be fed to the SQLite process rather than reaching it unauthenticated over a network. The vuln.today decision label is 'this_month', which signals a scheduled-patch priority rather than act_now/emergency. No CISA KEV listing and no EPSS score are present in the input, so there is no signal of active or probable exploitation. A public PoC reference exists (the abraxaslabs research write-up and the VulnCheck advisory), but it is not verified as working exploit code, so POC availability must not be read as active exploitation. The practical risk is concentrated entirely in applications that parse untrusted SQL text or open untrusted SQLite database files; where SQLite only ever handles trusted, developer-authored queries, real-world risk is low despite SQLite's enormous deployment footprint. Note the signal tension: PR:N implies no privileges, yet the vector is local with passive user interaction (UI:P), so 'unauthenticated' should be understood as 'no authentication step in the trigger path' rather than 'remotely reachable by anyone.' |
| Exploit ScenarioDerived | An application lets users upload or open SQLite database files, or exposes a SQL query interface that accepts arbitrary statements. An attacker submits a WITH clause chaining tens of thousands of common table expressions (or ships a view containing such nesting inside a crafted database file); when SQLite expands it, selectExpander() recurses without bound and exhausts the stack, crashing the process. A public PoC reference exists but is not verified as working exploit code. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 30, 2026
Stack exhaustion in SQLite before 3.54.0 lets an unauthenticated local attacker crash a process that parses attacker-supplied SQL - or that opens an untrusted database file containing a crafted view - by submitting a WITH clause that chains tens of thousands of common table expressions and drives unbounded recursion in selectExpander(). The vector is local (AV:L) with passive user interaction required (UI:P / UI:R), meaning the victim application must accept and process the malicious SQL text or database file, and impact is confined to a process crash (A:H) with no code execution, data disclosure or integrity loss. No confirmed public exploit code has been identified at time of analysis, though a third-party research write-up on SQLite CTE nesting is referenced; the vendor has released SQLite 3.54.0, which now counts CTE expansion against SQLITE_LIMIT_EXPR_DEPTH.
RemediationAI
Vendor-released patch: upgrade to SQLite 3.54.0 or later, which counts CTE expansion against SQLITE_LIMIT_EXPR_DEPTH (upstream commit https://github.com/sqlite/sqlite/commit/e6ff280c839fdfc7418fd5add12e8f32702a17fb, check-in https://sqlite.org/src/info/f54730871303e655, release notes https://sqlite.org/releaselog/3_54_0.html); embedding applications must rebuild against the 3.54.0 amalgamation rather than rely on an OS-packaged copy. Lowering SQLITE_LIMIT_EXPR_DEPTH is not an effective workaround on affected builds, because pre-3.54.0 CTE expansion was never counted against that limit - the very gap the fix closes - so the only reliable control before patching is to stop feeding untrusted input to the SQLite parser: refuse to execute SQL text supplied by users or external systems and refuse to open/attach database files of unknown provenance, at the cost of breaking legitimate use cases that depend on user-authored queries or imported database files. After upgrading, confirm SQLITE_MAX_EXPR_DEPTH is not configured to 0, since builds that disable the compile-time maximum compile the new checkSubqueryNestingDepth() guard out entirely.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SQLite implements common table expressions (CTEs, the WITH clause) by expanding each CTE reference during name resolution: resolveFromTermToCte() in src/select.c walks the chain of CTE references and selectExpander() recursively expands the underlying SELECT trees. Before 3.54.0 this expansion was not counted against SQLITE_LIMIT_EXPR_DEPTH - the existing depth check lived only in sqlite3ResultSetOfSelect() and so covered nested views and subqueries, but not CTE resolution - leaving the configured nesting limit unable to constrain a long WITH chain. A crafted statement (or a view stored in an untrusted database file) with tens of thousands of chained CTEs therefore recurses without bound until the C stack is exhausted and the process aborts, a CWE-674 (Uncontrolled Recursion) condition. The upstream fix e6ff280c839fdfc7418fd5add12e8f32702a17fb (check-in f54730871303e655, release 3.54.0) refactors the old subquery check into checkSubqueryNestingDepth(), increments pParse->nNestSel around CTE resolution in resolveFromTermToCte() (decrementing on exit with an assert that it stays non-negative), and raises "VIEWs and/or subqueries nested too deep" once nNestSel reaches db->aLimit[SQLITE_LIMIT_EXPR_DEPTH]. The accompanying test/with2.test cases 14.1 and 14.2 demonstrate the boundary: an 11-CTE chain succeeds with the limit set to 12 and errors with the limit set to 11. Note that the whole depth check is compiled only when SQLITE_MAX_EXPR_DEPTH>0, so builds that disable the compile-time maximum retain no depth enforcement.
Know when Sqlite gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Local because the malicious SQL or database file must be fed to the SQLite process, no privileges are needed but the victim must process untrusted input (UI:R), and the only impact is a process crash (A:H, C/I:N).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Multiple unspecified vulnerabilities in SQLite before 3.8.10.2, as used in Apple iOS before 9, have unknown impact and a
SQLite3 from 3.6.0 to and including 3.27.2 is vulnerable to heap out-of-bound read in the rtreenode() function when hand
SQLite 1.0.12 through 3.39.x before 3.39.2 sometimes allows an array-bounds overflow if billions of bytes are used in a
The getNodeSize function in ext/rtree/rtree.c in SQLite through 3.19.3, as used in GDAL and other products, mishandles u
Memory corruption in SQLite versions before 3.50.2 allows network-based attackers with low privileges to manipulate aggr
An exploitable use after free vulnerability exists in the window function functionality of Sqlite3 3.26.0. Rated high se
Arbitrary DLL loading in SQLite's sqldiff.exe utility on Windows allows attackers to achieve code execution by abusing t
Memory corruption in SQLite versions before 3.53.2 enables attackers to crash processes, exhaust memory, or potentially
SQLite 3.32.2 has a use-after-free in resetAccumulator in select.c because the parse tree rewrite for window functions i
SQLite through 3.31.1 allows attackers to cause a denial of service (segmentation fault) via a malformed window-function
A segmentation fault can occur in the sqlite3.exe command-line component of SQLite 3.36.0 via the idxGetTableInfo functi
OAuth and SCIM identity confusion in Open WebUI 0.6.41-0.10.x (SQLite-backed deployments only) allows unauthenticated re
EUVD-2026-113782
GHSA-v8vq-8vgf-h9mg
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB