CVE-2020-35527
Critical · 9.8CVSS
9.8
EPSS
1.7%
Published
Sep 1, 2022
CISA due date
—
Cloudanix analysis
A flaw in a widely used database engine can let attackers crash programs or potentially take them over by feeding in specially crafted database files.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Out-of-bounds memory access triggered by ALTER TABLE operations on views containing nested FROM clauses in SQLite, enabling memory corruption.
Why it matters to the business
Applications relying on SQLite may experience crashes, data corruption, or remote compromise when processing untrusted database schemas or queries, increasing operational risk and potential data exposure across dependent systems.
How an attack unfolds
An attacker supplies a malicious SQLite database file or executes crafted SQL statements that use ALTER TABLE against a view with a nested FROM clause, triggering the out-of-bounds access to read or write arbitrary memory and potentially achieve code execution.
How to fix it
Upgrade SQLite to a version later than 3.31.1 that resolves the out-of-bounds access. For NetApp ONTAP Select Deploy Administration Utility, apply the corresponding vendor patch once available. Validate all applications rebuild against the updated library.
How to confirm the fix worked
Confirm the installed SQLite version exceeds 3.31.1, execute regression tests using ALTER TABLE on views with nested FROM clauses, and monitor for absence of crashes or memory errors under those operations.
Typical attack path
- Identify an application or service that accepts or processes SQLite databases or SQL statements from untrusted sources.
- Craft a database containing a view with a nested FROM clause.
- Issue an ALTER TABLE statement against the view to trigger the out-of-bounds access.
- Leverage the resulting memory corruption to read sensitive data, cause denial of service, or execute arbitrary code.
How to detect it
Search application and database logs for unusual ALTER TABLE statements targeting views, monitor for SQLite process crashes or segmentation faults during schema modifications, and inspect for unexpected memory access patterns in debug or crash dumps.
What your security team should do
- Prioritize upgrading all SQLite instances and dependent products to patched releases.
- Review and restrict applications that process untrusted SQL or database files.
- Implement input validation and sandboxing around SQLite usage where feasible.
- Monitor EPSS trend for increased exploitation likelihood and reassess if exploit code emerges.
The record
In SQLite 3.31.1, there is an out of bounds access problem through ALTER TABLE for views that have a nested FROM clause.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | lemon | 0 | 3.26.0-16.el8_6 |
| AlmaLinux:8 | sqlite | 0 | 3.26.0-16.el8_6 |
| AlmaLinux:8 | sqlite-devel | 0 | 3.26.0-16.el8_6 |
| AlmaLinux:8 | sqlite-doc | 0 | 3.26.0-16.el8_6 |
| AlmaLinux:8 | sqlite-libs | 0 | 3.26.0-16.el8_6 |
| Bitnami | sqlite | 3.31.1 | No fix |
| Bitnami | sqlite | 3.31.1 | 3.31.2 |
| Debian:10 | sqlite3 | 0 | 3.27.2-3+deb10u2 |
| Debian:11 | sqlite3 | 0 | 3.32.0-1 |
| Debian:12 | sqlite3 | 0 | 3.32.0-1 |
| Debian:13 | sqlite3 | 0 | 3.32.0-1 |
| Red Hat:enterprise_linux:8::appstream | lemon | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::appstream | lemon-debuginfo | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::appstream | sqlite | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::appstream | sqlite-analyzer-debuginfo | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::appstream | sqlite-debuginfo | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::appstream | sqlite-debugsource | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::appstream | sqlite-devel | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::appstream | sqlite-doc | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::appstream | sqlite-libs | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::appstream | sqlite-libs-debuginfo | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::appstream | sqlite-tcl-debuginfo | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::baseos | lemon | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::baseos | lemon-debuginfo | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::baseos | sqlite | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::baseos | sqlite-analyzer-debuginfo | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::baseos | sqlite-debuginfo | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::baseos | sqlite-debugsource | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::baseos | sqlite-devel | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::baseos | sqlite-doc | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::baseos | sqlite-libs | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::baseos | sqlite-libs-debuginfo | 0 | 0:3.26.0-16.el8_6 |
| Red Hat:enterprise_linux:8::baseos | sqlite-tcl-debuginfo | 0 | 0:3.26.0-16.el8_6 |
| Rocky Linux:8 | sqlite | 0 | 0:3.26.0-16.el8_6 |
| Ubuntu:18.04:LTS | sqlite3 | 0 | 3.22.0-1ubuntu0.6 |
| Ubuntu:20.04:LTS | sqlite3 | 0 | 3.31.1-4ubuntu0.4 |
| Ubuntu:22.04:LTS | sqlite3 | 0 | 3.37.2-2 |
| Ubuntu:Pro:14.04:LTS | sqlite3 | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | sqlite3 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | sqlite3 | 0 | No fix |
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-24736 Buffer Overflow vulnerability found in SQLite3 v.3.27.1 and before allows a local… 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-2022-35737 SQLite 1.0.12 through 3.39.x before 3.39.2 sometimes allows an array-bounds overflow if… Also affects lemon
- CVE-2019-13751 Uninitialized data in SQLite in Google Chrome prior to 79.0.3945.79 allowed a remote… Also affects lemon
- CVE-2019-5827 Integer overflow in SQLite via WebSQL in Google Chrome prior to 74.0.3729.131 allowed a… Also affects lemon
- CVE-2025-7458 An integer overflow in the sqlite3KeyInfoFromExprList function in SQLite versions 3.39.2… Also affects sqlite
- CVE-2025-3277 An integer overflow can be triggered in SQLite’s `concat_ws()` function. Also affects sqlite