CVE-2022-35737
High · 7.5CVSS
7.5
EPSS
23.6%
Published
Aug 3, 2022
CISA due date
—
Cloudanix analysis
A flaw in a widely used database library can let attackers crash applications by feeding them enormous amounts of text, causing outages until the software is updated.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Array-bounds overflow triggered in SQLite when a C API function receives a string argument containing billions of bytes, leading to out-of-bounds memory access and denial of service.
Why it matters to the business
Applications relying on SQLite may crash or become unavailable when processing oversized string inputs, resulting in service disruptions for any system that accepts untrusted data through the database API; the library's extreme prevalence amplifies potential operational impact.
How an attack unfolds
An attacker supplies an extremely large string (billions of bytes) as an argument to a vulnerable SQLite C API call within an application, causing the bounds overflow and service interruption; public exploits exist and the flaw has been known since 2022.
How to fix it
Upgrade sqlite to version 3.39.2 or later; the GIT repository is fixed at commit 202b2a7b54ea2dd13a8a5adfd75523abe4dcf17f. Rebuild and redeploy any dependent applications after the upgrade.
How to confirm the fix worked
Confirm the installed SQLite version is 3.39.2 or newer; attempt to reproduce the overflow using a test case that passes a multi-gigabyte string to the affected C API functions and verify no crash occurs.
Typical attack path
- Locate an application or service that uses a vulnerable SQLite version and exposes a C API path accepting string input
- Craft and deliver a payload containing billions of bytes in a single string argument
- Trigger the SQLite C API call with the oversized string to induce the array-bounds overflow
- Observe denial-of-service effect from the resulting memory corruption
How to detect it
Search application and system logs for SQLite-related crashes or segmentation faults occurring after receipt of unusually large string inputs; review process core dumps or memory error reports tied to SQLite C API entry points.
What your security team should do
- Immediately upgrade all instances of SQLite to 3.39.2 or the referenced commit
- Inventory and prioritize update of high-exposure applications that accept external input via SQLite C APIs
- Monitor EPSS trend and exploit availability for any delayed environments
- Add runtime checks or input-size limits in front of SQLite calls until patching is complete
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| crates.io | libsqlite3-sys | 0 | 0.25.1 |
| crates.io | libsqlite3-sys | 0.0.0-0 | 0.25.1 |
| AlmaLinux:8 | lemon | 0 | 3.26.0-17.el8_7 |
| AlmaLinux:8 | sqlite | 0 | 3.26.0-17.el8_7 |
| AlmaLinux:8 | sqlite-devel | 0 | 3.26.0-17.el8_7 |
| AlmaLinux:8 | sqlite-doc | 0 | 3.26.0-17.el8_7 |
| AlmaLinux:8 | sqlite-libs | 0 | 3.26.0-17.el8_7 |
| AlmaLinux:9 | sqlite | 0 | 3.34.1-6.el9_1 |
| AlmaLinux:9 | sqlite-devel | 0 | 3.34.1-6.el9_1 |
| AlmaLinux:9 | sqlite-libs | 0 | 3.34.1-6.el9_1 |
| Alpine:v3.15 | sqlite | 0 | 0 |
| Alpine:v3.16 | sqlite | 0 | 0 |
| Alpine:v3.17 | sqlite | 0 | 0 |
| Alpine:v3.18 | sqlite | 0 | 0 |
| Alpine:v3.19 | sqlite | 0 | 0 |
| Alpine:v3.20 | sqlite | 0 | 0 |
| Alpine:v3.21 | sqlite | 0 | 0 |
| Alpine:v3.22 | sqlite | 0 | 0 |
| Bitnami | sqlite | 1.0.12 | 3.39.2 |
| Debian:10 | sqlite | 0 | No fix |
| Debian:10 | sqlite3 | 0 | No fix |
| Debian:11 | sqlite3 | 0 | No fix |
| Debian:12 | sqlite3 | 0 | 3.39.2-1 |
| Debian:13 | sqlite3 | 0 | 3.39.2-1 |
| Debian:14 | sqlite3 | 0 | 3.39.2-1 |
| Mageia:8 | sqlite3 | 0 | 3.39.2-1.mga8 |
| Red Hat:enterprise_linux:8::appstream | lemon | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::appstream | lemon-debuginfo | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::appstream | sqlite | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::appstream | sqlite-analyzer-debuginfo | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::appstream | sqlite-debuginfo | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::appstream | sqlite-debugsource | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::appstream | sqlite-devel | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::appstream | sqlite-doc | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::appstream | sqlite-libs | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::appstream | sqlite-libs-debuginfo | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::appstream | sqlite-tcl-debuginfo | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::baseos | lemon | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::baseos | lemon-debuginfo | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::baseos | sqlite | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::baseos | sqlite-analyzer-debuginfo | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::baseos | sqlite-debuginfo | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::baseos | sqlite-debugsource | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::baseos | sqlite-devel | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::baseos | sqlite-doc | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::baseos | sqlite-libs | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::baseos | sqlite-libs-debuginfo | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:8::baseos | sqlite-tcl-debuginfo | 0 | 0:3.26.0-17.el8_7 |
| Red Hat:enterprise_linux:9::appstream | lemon-debuginfo | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::appstream | sqlite | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::appstream | sqlite-analyzer-debuginfo | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::appstream | sqlite-debuginfo | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::appstream | sqlite-debugsource | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::appstream | sqlite-devel | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::appstream | sqlite-libs | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::appstream | sqlite-libs-debuginfo | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::appstream | sqlite-tcl-debuginfo | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::appstream | sqlite-tools-debuginfo | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::baseos | lemon-debuginfo | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::baseos | sqlite | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::baseos | sqlite-analyzer-debuginfo | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::baseos | sqlite-debuginfo | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::baseos | sqlite-debugsource | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::baseos | sqlite-devel | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::baseos | sqlite-libs | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::baseos | sqlite-libs-debuginfo | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::baseos | sqlite-tcl-debuginfo | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:enterprise_linux:9::baseos | sqlite-tools-debuginfo | 0 | 0:3.34.1-6.el9_1 |
| Red Hat:rhel_eus:8.6::appstream | lemon | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::appstream | lemon-debuginfo | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::appstream | sqlite | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::appstream | sqlite-analyzer-debuginfo | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::appstream | sqlite-debuginfo | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::appstream | sqlite-debugsource | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::appstream | sqlite-devel | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::appstream | sqlite-doc | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::appstream | sqlite-libs | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::appstream | sqlite-libs-debuginfo | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::appstream | sqlite-tcl-debuginfo | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::baseos | lemon | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::baseos | lemon-debuginfo | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::baseos | sqlite | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::baseos | sqlite-analyzer-debuginfo | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::baseos | sqlite-debuginfo | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::baseos | sqlite-debugsource | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::baseos | sqlite-devel | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::baseos | sqlite-doc | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::baseos | sqlite-libs | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::baseos | sqlite-libs-debuginfo | 0 | 0:3.26.0-16.el8_6.1 |
| Red Hat:rhel_eus:8.6::baseos | sqlite-tcl-debuginfo | 0 | 0:3.26.0-16.el8_6.1 |
| Rocky Linux:8 | sqlite | 0 | 0:3.26.0-17.el8_7 |
| Rocky Linux:9 | sqlite | 0 | 0:3.34.1-6.el9_1 |
| SUSE:Enterprise Storage 6 | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Enterprise Storage 7 | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise High Performance Computing 15-ESPOS | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise High Performance Computing 15-LTSS | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise Micro 5.1 | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise Micro 5.2 | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise Micro 5.3 | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP3 | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP4 | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise Server 12 SP2-BCL | sqlite3 | 0 | 3.39.3-9.23.1 |
| SUSE:Linux Enterprise Server 12 SP3-BCL | sqlite3 | 0 | 3.39.3-9.23.1 |
| SUSE:Linux Enterprise Server 12 SP4-LTSS | sqlite3 | 0 | 3.39.3-9.23.1 |
| SUSE:Linux Enterprise Server 12 SP5 | sqlite3 | 0 | 3.39.3-9.23.1 |
| SUSE:Linux Enterprise Server 15 SP1-BCL | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise Server 15 SP1-LTSS | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise Server 15 SP2-BCL | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise Server 15 SP2-LTSS | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise Server 15-LTSS | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | sqlite3 | 0 | 3.39.3-9.23.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | sqlite3 | 0 | 3.39.3-9.23.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP5 | sqlite3 | 0 | 3.39.3-9.23.1 |
| SUSE:Manager Proxy 4.1 | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Manager Retail Branch Server 4.1 | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:Manager Server 4.1 | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| SUSE:OpenStack Cloud 9 | sqlite3 | 0 | 3.39.3-9.23.1 |
| SUSE:OpenStack Cloud Crowbar 9 | sqlite3 | 0 | 3.39.3-9.23.1 |
| Ubuntu:16.04:LTS | sqlite | 0 | No fix |
| Ubuntu:18.04:LTS | sqlite3 | 0 | 3.22.0-1ubuntu0.7 |
| Ubuntu:20.04:LTS | sqlite3 | 0 | 3.31.1-4ubuntu0.5 |
| Ubuntu:22.04:LTS | sqlite3 | 0 | 3.37.2-2ubuntu0.1 |
| Ubuntu:Pro:14.04:LTS | sqlite3 | 0 | 3.8.2-1ubuntu2.2+esm3 |
| Ubuntu:Pro:16.04:LTS | sqlite | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | sqlite3 | 0 | 3.11.0-1ubuntu1.5+esm2 |
| conan | sqlite3 | 1.0.12 | 3.39.2 |
| openSUSE:Leap 15.3 | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| openSUSE:Leap 15.4 | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| openSUSE:Leap Micro 5.2 | sqlite3 | 0 | 3.39.3-150000.3.17.1 |
| openSUSE:Tumbleweed | sqlite3 | 0 | 3.39.2-1.1 |
Related vulnerabilities
- CVE-2025-6965 There exists a vulnerability in SQLite versions before 3.50.2 where the number of… Also affects lemon
- CVE-2020-35525 In SQlite 3.31.1, a potential null pointer derreference was found in the INTERSEC query… Also affects lemon
- CVE-2019-8457 SQLite3 from 3.6.0 to and including 3.27.2 is vulnerable to heap out-of-bound read in the… Also affects sqlite
- CVE-2024-0232 A heap use-after-free issue has been identified in SQLite in the jsonParseAddNodeArray()… Also affects sqlite
- CVE-2022-46908 SQLite through 3.40.0, when relying on --safe for execution of an untrusted CLI script… Also affects sqlite
- CVE-2016-6153 os_unix.c in SQLite before 3.13.0 improperly implements the temporary directory search… Also affects sqlite
- CVE-2013-7443 Buffer overflow in the skip-scan optimization in SQLite 3.8.2 allows remote attackers to… Also affects sqlite3
- CVE-2019-13734 Out of bounds write in SQLite in Google Chrome prior to 79.0.3945.79 allowed a remote… Also affects lemon