CVE-2022-35737
Description
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 string argument to a C API.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
SQLite CVE-2022-35737 is an array-bounds overflow in printf functions triggered by large string inputs, enabling denial-of-service and potentially arbitrary code execution on 64-bit systems.
Vulnerability
Overview
CVE-2022-35737 is an array-bounds overflow vulnerability in SQLite versions 1.0.12 through 3.39.x before 3.39.2. The bug occurs when a string argument exceeding billions of bytes is passed to SQLite's C API printf functions (specifically the %Q, %q, or %w format substitution types) [1]. This flaw was introduced in SQLite 1.0.12 (released in 2000) and fixed in version 3.39.2 (July 2022) [1].
Exploitation and
Attack Surface
The vulnerability is exploitable on 64-bit systems when the library is compiled without stack canaries, allowing for arbitrary code execution; with stack canaries, only denial-of-service is confirmed [1]. Exploitation requires passing large string inputs into the SQLite printf functions, and if the format string includes the '!' special character for unicode scanning, arbitrary code execution becomes possible in the worst case [1]. The official SQLite vulnerability page notes that in practice, exploitation requires the attacker to submit and run arbitrary SQL statements or provide a malicious database file, conditions few real-world applications meet [2].
Impact
On vulnerable versions, an attacker can cause a denial-of-service (crash) in all cases, and on systems compiled without stack canaries, arbitrary code execution is achievable [1]. The bug is notable because compiler optimizations interacting with undefined behavior can make exploitation easier [1].
Mitigation
The vulnerability is fixed in SQLite version 3.39.2 and later [1]. Applications using SQLite should update to this version or newer. For languages with bindings like rusqlite (Rust), using the 'bundled' feature ensures an up-to-date SQLite is compiled in, avoiding the vulnerable version [3].
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
libsqlite3-syscrates.io | < 0.25.1 | 0.25.1 |
Affected products
1- SQLite/SQLitedescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
11- github.com/advisories/GHSA-jw36-hf63-69r9ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-35737ghsaADVISORY
- security.gentoo.org/glsa/202210-40ghsavendor-advisoryWEB
- blog.trailofbits.com/2022/10/25/sqlite-vulnerability-july-2022-library-apighsaWEB
- kb.cert.org/vuls/id/720344ghsaWEB
- rustsec.org/advisories/RUSTSEC-2022-0090.htmlghsaWEB
- security.netapp.com/advisory/ntap-20220915-0009ghsaWEB
- sqlite.org/releaselog/3_39_2.htmlghsaWEB
- www.sqlite.org/cves.htmlghsaWEB
- blog.trailofbits.com/2022/10/25/sqlite-vulnerability-july-2022-library-api/mitre
- security.netapp.com/advisory/ntap-20220915-0009/mitre
News mentions
1- ABB B&R Automation StudioCISA ICS Advisories