Cloudanix VulnDB

CVE-2020-13631

Medium · 5.5

CVSS

5.5

EPSS

0.7%

Published

May 27, 2020

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A widely used database component contained a flaw that let someone with access to a program using it rename certain internal tables in a way that could damage stored information.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Low
Impact
Data Tampering
Component
Library
Class
Improper Input Validation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Allows a virtual table to be renamed via ALTER TABLE to the name of one of its own shadow tables, bypassing name validation logic in alter.c and build.c and resulting in high-integrity database corruption.

Why it matters to the business

Local users or compromised applications can silently corrupt SQLite-backed data stores, leading to application malfunction, lost or altered records, and potential compliance failures in any product embedding the vulnerable library.

How an attack unfolds

An attacker with local database access issues a crafted ALTER TABLE RENAME statement targeting a virtual table whose shadow table name collides with the new name; the missing validation permits the rename, after which subsequent operations on the virtual table or its shadows produce inconsistent internal state and integrity violations.

How to fix it

Upgrade sqlite to version 3.32.0 or later; for source builds apply commit 0b0274a90c68a20c3dcab0b9f5719adda9402117. Rebuild and redeploy all dependent applications after the library update.

How to confirm the fix worked

Confirm the installed SQLite library reports version 3.32.0 or newer; run the project's regression test suite including virtual-table rename cases; attempt the previously successful rename operation and verify it is now rejected.

Typical attack path

  1. Obtain local access or compromise a process that can execute SQL against the target SQLite database
  2. Identify a virtual table and the names of its associated shadow tables
  3. Issue ALTER TABLE RENAME TO using a shadow table name as the destination
  4. Trigger follow-on queries or application operations that rely on the virtual table
  5. Observe or leverage the resulting database corruption or logic errors

How to detect it

Review application or database logs for unusual ALTER TABLE RENAME statements on virtual tables; look for subsequent errors referencing shadow tables or integrity-check failures; examine SQLite journal and WAL files for unexpected rename operations around the time of suspected compromise.

What your security team should do

  • Inventory all applications and containers that statically or dynamically link SQLite and prioritize upgrades for those reachable by untrusted local users
  • Apply the fixed commit or packaged 3.32.0+ build within standard change windows
  • Add SQLite version checks to build pipelines and container base images
  • Monitor EPSS and KEV updates; schedule re-assessment if exploitation maturity changes

The record

SQLite before 3.32.0 allows a virtual table to be renamed to the name of one of its shadow tables, related to alter.c and build.c.

Affected packages

Ecosystem Package Introduced Fixed
AlmaLinux:8 mingw-binutils-generic 0 2.30-3.el8
AlmaLinux:8 mingw-filesystem-base 0 104-2.el8
AlmaLinux:8 mingw32-binutils 0 2.30-3.el8
AlmaLinux:8 mingw32-bzip2 0 1.0.6-14.el8
AlmaLinux:8 mingw32-bzip2-static 0 1.0.6-14.el8
AlmaLinux:8 mingw32-filesystem 0 104-2.el8
AlmaLinux:8 mingw32-sqlite 0 3.26.0.0-1.el8
AlmaLinux:8 mingw32-sqlite-static 0 3.26.0.0-1.el8
AlmaLinux:8 mingw64-binutils 0 2.30-3.el8
AlmaLinux:8 mingw64-bzip2 0 1.0.6-14.el8
AlmaLinux:8 mingw64-bzip2-static 0 1.0.6-14.el8
AlmaLinux:8 mingw64-filesystem 0 104-2.el8
AlmaLinux:8 mingw64-sqlite 0 3.26.0.0-1.el8
AlmaLinux:8 mingw64-sqlite-static 0 3.26.0.0-1.el8
Bitnami sqlite 0 3.32.0
Debian:11 sqlite3 0 3.32.0-1
Debian:12 sqlite3 0 3.32.0-1
Debian:13 sqlite3 0 3.32.0-1
Debian:14 sqlite3 0 3.32.0-1
Mageia:7 sqlite3 0 3.31.1-1.1.mga7
Red Hat:enterprise_linux:8::appstream lemon 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::appstream lemon-debuginfo 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::appstream sqlite 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::appstream sqlite-analyzer-debuginfo 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::appstream sqlite-debuginfo 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::appstream sqlite-debugsource 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::appstream sqlite-devel 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::appstream sqlite-doc 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::appstream sqlite-libs 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::appstream sqlite-libs-debuginfo 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::appstream sqlite-tcl-debuginfo 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::baseos lemon 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::baseos lemon-debuginfo 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::baseos sqlite 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::baseos sqlite-analyzer-debuginfo 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::baseos sqlite-debuginfo 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::baseos sqlite-debugsource 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::baseos sqlite-devel 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::baseos sqlite-doc 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::baseos sqlite-libs 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::baseos sqlite-libs-debuginfo 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::baseos sqlite-tcl-debuginfo 0 0:3.26.0-11.el8
Red Hat:enterprise_linux:8::crb mingw-binutils 0 0:2.30-3.el8
Red Hat:enterprise_linux:8::crb mingw-binutils-debuginfo 0 0:2.30-3.el8
Red Hat:enterprise_linux:8::crb mingw-binutils-debugsource 0 0:2.30-3.el8
Red Hat:enterprise_linux:8::crb mingw-binutils-generic 0 0:2.30-3.el8
Red Hat:enterprise_linux:8::crb mingw-binutils-generic-debuginfo 0 0:2.30-3.el8
Red Hat:enterprise_linux:8::crb mingw-bzip2 0 0:1.0.6-14.el8
Red Hat:enterprise_linux:8::crb mingw-filesystem 0 0:104-2.el8
Red Hat:enterprise_linux:8::crb mingw-filesystem-base 0 0:104-2.el8
Red Hat:enterprise_linux:8::crb mingw-sqlite 0 0:3.26.0.0-1.el8
Red Hat:enterprise_linux:8::crb mingw32-binutils 0 0:2.30-3.el8
Red Hat:enterprise_linux:8::crb mingw32-binutils-debuginfo 0 0:2.30-3.el8
Red Hat:enterprise_linux:8::crb mingw32-bzip2 0 0:1.0.6-14.el8
Red Hat:enterprise_linux:8::crb mingw32-bzip2-debuginfo 0 0:1.0.6-14.el8
Red Hat:enterprise_linux:8::crb mingw32-bzip2-static 0 0:1.0.6-14.el8
Red Hat:enterprise_linux:8::crb mingw32-filesystem 0 0:104-2.el8
Red Hat:enterprise_linux:8::crb mingw32-sqlite 0 0:3.26.0.0-1.el8
Red Hat:enterprise_linux:8::crb mingw32-sqlite-debuginfo 0 0:3.26.0.0-1.el8
Red Hat:enterprise_linux:8::crb mingw32-sqlite-static 0 0:3.26.0.0-1.el8
Red Hat:enterprise_linux:8::crb mingw64-binutils 0 0:2.30-3.el8
Red Hat:enterprise_linux:8::crb mingw64-binutils-debuginfo 0 0:2.30-3.el8
Red Hat:enterprise_linux:8::crb mingw64-bzip2 0 0:1.0.6-14.el8
Red Hat:enterprise_linux:8::crb mingw64-bzip2-debuginfo 0 0:1.0.6-14.el8
Red Hat:enterprise_linux:8::crb mingw64-bzip2-static 0 0:1.0.6-14.el8
Red Hat:enterprise_linux:8::crb mingw64-filesystem 0 0:104-2.el8
Red Hat:enterprise_linux:8::crb mingw64-sqlite 0 0:3.26.0.0-1.el8
Red Hat:enterprise_linux:8::crb mingw64-sqlite-debuginfo 0 0:3.26.0.0-1.el8
Red Hat:enterprise_linux:8::crb mingw64-sqlite-static 0 0:3.26.0.0-1.el8
SUSE:Enterprise Storage 6 sqlite3 0 3.36.0-3.12.1
SUSE:HPE Helion OpenStack 8 sqlite3 0 3.36.0-9.18.1
SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS sqlite3 0 3.36.0-3.12.1
SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS sqlite3 0 3.36.0-3.12.1
SUSE:Linux Enterprise High Performance Computing 15-ESPOS sqlite3 0 3.36.0-3.12.1
SUSE:Linux Enterprise High Performance Computing 15-LTSS sqlite3 0 3.36.0-3.12.1
SUSE:Linux Enterprise Micro 5.0 sqlite3 0 3.36.0-3.12.1
SUSE:Linux Enterprise Module for Basesystem 15 SP2 sqlite3 0 3.36.0-3.12.1
SUSE:Linux Enterprise Module for Basesystem 15 SP3 sqlite3 0 3.36.0-3.12.1
SUSE:Linux Enterprise Server 12 SP2-BCL sqlite3 0 3.36.0-9.18.1
SUSE:Linux Enterprise Server 12 SP3-BCL sqlite3 0 3.36.0-9.18.1
SUSE:Linux Enterprise Server 12 SP3-LTSS sqlite3 0 3.36.0-9.18.1
SUSE:Linux Enterprise Server 12 SP4-LTSS sqlite3 0 3.36.0-9.18.1
SUSE:Linux Enterprise Server 12 SP5 sqlite3 0 3.36.0-9.18.1
SUSE:Linux Enterprise Server 15 SP1-BCL sqlite3 0 3.36.0-3.12.1
SUSE:Linux Enterprise Server 15 SP1-LTSS sqlite3 0 3.36.0-3.12.1
SUSE:Linux Enterprise Server 15-LTSS sqlite3 0 3.36.0-3.12.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP3 sqlite3 0 3.36.0-9.18.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP4 sqlite3 0 3.36.0-9.18.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 sqlite3 0 3.36.0-9.18.1
SUSE:Linux Enterprise Server for SAP Applications 15 sqlite3 0 3.36.0-3.12.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP1 sqlite3 0 3.36.0-3.12.1
SUSE:Linux Enterprise Software Development Kit 12 SP5 sqlite3 0 3.36.0-9.18.1
SUSE:Manager Proxy 4.0 sqlite3 0 3.36.0-3.12.1
SUSE:Manager Retail Branch Server 4.0 sqlite3 0 3.36.0-3.12.1
SUSE:Manager Server 4.0 sqlite3 0 3.36.0-3.12.1
SUSE:OpenStack Cloud 8 sqlite3 0 3.36.0-9.18.1
SUSE:OpenStack Cloud 9 sqlite3 0 3.36.0-9.18.1
SUSE:OpenStack Cloud Crowbar 8 sqlite3 0 3.36.0-9.18.1
SUSE:OpenStack Cloud Crowbar 9 sqlite3 0 3.36.0-9.18.1
Ubuntu:14.04:LTS sqlite 0 No fix
Ubuntu:16.04:LTS sqlite 0 No fix
Ubuntu:16.04:LTS sqlite3 0 3.11.0-1ubuntu1.5
Ubuntu:18.04:LTS sqlite 0 No fix
Ubuntu:18.04:LTS sqlite3 0 3.22.0-1ubuntu0.4
Ubuntu:20.04:LTS sqlite 0 No fix
Ubuntu:20.04:LTS sqlite3 0 3.31.1-4ubuntu0.1
Ubuntu:Pro:14.04:LTS sqlite 0 No fix
Ubuntu:Pro:14.04:LTS sqlite3 0 No fix
Ubuntu:Pro:16.04:LTS sqlite 0 No fix
Ubuntu:Pro:16.04:LTS sqlite3 0 No fix
Ubuntu:Pro:18.04:LTS sqlite 0 No fix
Ubuntu:Pro:18.04:LTS sqlite3 0 No fix
Ubuntu:Pro:20.04:LTS sqlite 0 No fix
openSUSE:Leap 15.2 sqlite3 0 3.36.0-lp152.4.3.1
openSUSE:Leap 15.3 sqlite3 0 3.36.0-3.12.1
openSUSE:Tumbleweed sqlite3 0 3.36.0-1.2

Related vulnerabilities