CVE-2026-119371: SQLite before 3.54.0 Stack Exhaustion via CTE Chain in selectExpander()

Published Oct 30, 2026
·
Updated

SQLite before 3.54.0 contains a stack exhaustion vulnerability that allows attackers to bypass the SQLITELIMITEXPRDEPTH 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.

Other sources

SQLite before 3.54.0 Stack Exhaustion via CTE Chain in selectExpander()

— Microsoft

Affected Software

21 affected componentsFixes available
SQLite SQLite<3.54.0
debian/sqlite3*
debian/sqlite3*
debian/sqlite3<3.54.1-1
3.54.1-1
bitnami/sqlite<3.54.0
3.54.0
debian/sqlite3<=3.40.1-2+deb12u2, <=3.46.1-7+deb13u2
3.54.1-1
All of the following
azurelinux/sqlite<3.44.0-5
3.44.0-5
Microsoft Azure Linux=3.0
ubuntu/sqlite*
ubuntu/sqlite3*
ubuntu/sqlite3*
ubuntu/sqlite*
ubuntu/sqlite3*
ubuntu/sqlite*
ubuntu/sqlite3*
ubuntu/sqlite*
ubuntu/sqlite*
ubuntu/sqlite3*
ubuntu/sqlite3*
ubuntu/sqlite3*
ubuntu/sqlite3<3.46.1-9ubuntu0.5
3.46.1-9ubuntu0.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/sqlite3 to a version that resolves this vulnerability.

    Fixed in 3.54.1-1
  2. Upgrade

    Upgrade bitnami/sqlite to a version that resolves this vulnerability.

    Fixed in 3.54.0
  3. Upgrade

    Upgrade azurelinux/sqlite to a version that resolves this vulnerability.

    Fixed in 3.44.0-5
  4. Upgrade

    Upgrade ubuntu/sqlite3 to a version that resolves this vulnerability.

    Fixed in 3.46.1-9ubuntu0.5

Event History

Oct 30, 2026
CVE Published
via MITRE·11:30 AM
Data Sourced
via MITRE·11:30 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·12:16 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·01:26 PM
DescriptionSeverityAffected Software
Oct 31, 2026
Data Sourced
via Microsoft·08:04 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:04 AM
Affected Software
Nov 1, 2026
Data Sourced
via OSV·10:00 AM
Affected Software
Nov 3, 2026
Data Sourced
via NVD·04:10 PM
RemedyAffected Software
Nov 12, 2026
Updated
via OSV·11:00 PM
Affected Software
Nov 17, 2026
Advisory Published
via OSV·11:59 AM
Dec 2, 2026
Updated
via OSV·02:20 AM
Affected Software

Frequently Asked Questions

1

Who is exposed to this issue?

Applications using SQLite versions before 3.54.0 are exposed if they process attacker-supplied SQL or open untrusted SQLite database files that may contain views.

2

What does an attacker need to trigger the crash?

An attacker needs a way to provide SQL containing a WITH clause with tens of thousands of chained CTEs, either directly as SQL input or indirectly through a view stored in an untrusted database file. No privileges are required, but user interaction is required according to the supplied vector.

3

What is the impact of successful exploitation?

The chained CTEs cause unbounded recursion in selectExpander(), exhausting the stack and crashing the SQLite-using process. The provided impact metrics indicate availability impact only, with no stated confidentiality or integrity impact.

4

Does SQLITE_LIMIT_EXPR_DEPTH mitigate this issue?

No. The issue exists because common table expressions are not counted toward SQLITE_LIMIT_EXPR_DEPTH, allowing attackers to bypass that nesting limit.

5

What can be done if upgrading is not immediately possible?

Avoid executing untrusted SQL and avoid opening untrusted SQLite database files, particularly files that may contain attacker-controlled views. These are the identified delivery paths for the CTE chain.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203