Heap Overflow Vulnerability in SQLite Package - CVE-2020-15358

sqlite Updated 02 Oct 2025

Summary

27/06/2020
N/A
Yes i
Medium
5.5

ALPINE-CVE-2020-15358: In SQLite before 3.32.3, select.c mishandles query-flattener optimization, leading to a multiSelectOrderBy heap overflow because of misuse of transitive properties for constant propagation. Affects sqlite versions < 3.32.1-r1. Fixed in 3.32.1-r1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

SQLite is a widely-used, self-contained, serverless SQL database engine that is known for its simplicity and efficiency. It is commonly utilized in mobile applications, embedded systems, and web browsers. The package version in question, sqlite, is part of the Alpine Linux distribution, specifically version 3.12. This package allows developers to integrate SQLite database functionalities into their applications. However, it has been identified to have a vulnerability that can lead to serious security issues.

Vulnerability Detail

In SQLite versions prior to 3.32.3, a flaw exists in the select.c file where the query-flattener optimization is mishandled. This mismanagement can result in a multiSelectOrderBy heap overflow due to the improper use of transitive properties for constant propagation. If exploited, this vulnerability could allow an attacker to execute arbitrary code, potentially compromising the integrity and confidentiality of the affected systems.

How To Fix

Minimum fixed version

3.32.1-r1

This is the first release that contains the fix.

sudo apk add --upgrade sqlite

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, if updating the package is not immediately feasible, consider limiting the use of SQLite in scenarios where untrusted input could be processed. Additionally, review and sanitize all SQL queries to minimize the risk of exploitation.

Conclusion

The vulnerability identified as CVE-2020-15358 in the SQLite package poses a significant risk due to its potential for heap overflow exploitation. It is crucial for users of the affected package to update to the patched version to mitigate this risk. Utilizing tools like Vulert can help in monitoring and managing vulnerabilities effectively.

See every vulnerability recorded for sqlite →

Share this vulnerability

FAQ

CVE-2020-15358 is a vulnerability in the SQLite package that can lead to a heap overflow due to mishandling of query optimization.

You can use the Vulert platform to monitor and alert for open-source vulnerabilities. Visit Vulert Scanner to check if your application is affected without any signup.

Exploitation of this vulnerability could allow attackers to execute arbitrary code, leading to data breaches or system compromise.

Yes, the vulnerability is fixed in sqlite version 3.32.1-r1 and later. It is recommended to update to this version or higher.

The CVSS score for this vulnerability is 5.5, indicating a moderate level of risk.

Related vulnerabilities

Recent vulnerabilities recorded for sqlite.

How To Fix

Minimum fixed version

3.32.1-r1

This is the first release that contains the fix.

sudo apk add --upgrade sqlite

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback