{"id":"CVE-2026-119371","kind":"vulnerability","aliases":["CVE-2026-119371"],"related":[],"title":"SQLite: deep CTE chains exhaust the stack and crash the process","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.","summary":"SQLite before 3.54.0 does not count common table expressions against its expression nesting limit, so a WITH clause with tens of thousands of CTEs makes the query planner recurse until the process crashes. An attacker who can supply SQL or open an untrusted database file with a crafted view can cause a denial of service.","severity":"medium","cvss":6.8,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["embedded-databases","node","python","runtime","sqlite"],"not_affected_if":["sqlite-3.54.0-or-later","trusted-queries-only"],"how_to_check":"- Run `sqlite3 --version` or check the bundled SQLite version in your application's dependencies\n- Look for any code that runs queries from untrusted sources or opens database files from outside your control","fix":"- SQLite versions before `3.54.0` are affected; move to `3.54.0` or later","status":"open","published_at":"2026-10-30T12:16:35+00:00","first_seen_at":"2026-10-30T12:30:23+00:00","triaged_at":"2026-10-30T12:32:38+00:00","updated_at":"2026-10-30T12:32:38+00:00","category":"runtime","confidence":0.7,"triage":{"at":"2026-10-30T12:32:38Z","model":"claude-haiku-5-5","output":{"fix":"- SQLite versions before `3.54.0` are affected; move to `3.54.0` or later","reach":"unknown","title":"SQLite: deep CTE chains exhaust the stack and crash the process","impact":"low","summary":"SQLite before 3.54.0 does not count common table expressions against its expression nesting limit, so a WITH clause with tens of thousands of CTEs makes the query planner recurse until the process crashes. An attacker who can supply SQL or open an untrusted database file with a crafted view can cause a denial of service.","audience":"developers","category":"runtime","nicknames":[],"who_cares":["sqlite","python","node","embedded-databases"],"confidence":0.7,"fix_status":"available","needs_auth":"unknown","worst_case":"Attacker crashes the process with a crafted WITH clause","analyst_note":"","how_to_check":"- Run `sqlite3 --version` or check the bundled SQLite version in your application's dependencies\n- Look for any code that runs queries from untrusted sources or opens database files from outside your control","plain_action":"","needs_analyst":false,"not_affected_if":["trusted-queries-only","sqlite-3.54.0-or-later"],"who_is_affected":"Applications that embed SQLite and run SQL or open database files that an outside party can influence, such as user-uploaded databases or user-supplied queries. Applications that only run trusted, fixed queries against their own database files are unlikely to be exposed.","user_interaction":"unknown","needs_special_setup":"no","severity_if_unknown":"medium"},"cost_usd":0.000686,"input_tokens":4173,"output_tokens":537,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-119371':14A,17A '-2026':13A,16A '3.54.0':27B,82C 'allow':89C 'attack':59B,90C,109C 'bypass':92C 'caus':75B,132C 'chain':4A,115C 'claus':42B,114C 'common':31B,101C 'contain':83C 'count':30B,106C 'craft':72B 'crash':9A,57B,137C 'cte':3A 'ctes':48B,120C 'cve':12A,15A 'databas':20B,68B,130C 'deep':2A 'denial':77B 'depth':97C 'embed':19B 'embedded-databas':18B 'exhaust':5A,86C 'expr':96C 'express':33B,36B,103C 'file':69B,131C 'limit':38B,95C,99C 'make':49B 'nest':37B,98C 'node':21B 'open':65B 'plain':122C 'planner':52B 'process':11A,56B,139C 'python':22B 'queri':51B 'recurs':53B,135C 'runtim':23B 'selectexpand':134C 'servic':79B 'sql':63B,123C 'sqlite':1A,24B,25B,80C,94C 'stack':7A,85C 'suppli':62B,111C 'tabl':32B,102C 'ten':44B,116C 'thousand':46B,118C 'unbound':133C 'untrust':67B,129C 'via':121C 'view':73B,126C 'vulner':87C","nicknames":[],"mitigations":[],"who_affected":"Applications that embed SQLite and run SQL or open database files that an outside party can influence, such as user-uploaded databases or user-supplied queries. Applications that only run trusted, fixed queries against their own database files are unlikely to be exposed.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"first_public_at":"2026-10-30T12:16:35+00:00","kev":null,"cvss_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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-119371","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-119371","severity":null,"published_at":"2026-10-30T12:16:35+00:00","modified_at":"2026-10-30T12:16:35+00:00","first_seen_at":"2026-10-30T12:30:23+00:00","fetched_at":"2026-10-30T12:30:23+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}