Cloudanix VulnDB

CVE-2020-35527

Critical · 9.8

CVSS

9.8

EPSS

1.7%

Published

Sep 1, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

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

  1. Identify an application or service that accepts or processes SQLite databases or SQL statements from untrusted sources.
  2. Craft a database containing a view with a nested FROM clause.
  3. Issue an ALTER TABLE statement against the view to trigger the out-of-bounds access.
  4. 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