Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2020-15358

CVE-2020-15358: SQLite Buffer Overflow Vulnerability

CVE-2020-15358 is a heap buffer overflow vulnerability in SQLite caused by query-flattener optimization mishandling. This article covers the technical details, affected versions, security impact, and mitigation strategies.

Published: March 11, 2026

CVE-2020-15358 Overview

CVE-2020-15358 is a heap overflow vulnerability in SQLite versions prior to 3.32.3, caused by improper handling of query-flattener optimization in the select.c module. The vulnerability stems from the misuse of transitive properties during constant propagation, which leads to a multiSelectOrderBy heap overflow condition. This memory corruption vulnerability can be exploited locally to cause denial of service through application crashes.

Critical Impact

Local attackers can trigger a heap overflow in SQLite's query optimizer, potentially causing denial of service in applications that process untrusted SQL queries. Given SQLite's widespread use across operating systems, mobile platforms, and enterprise applications, this vulnerability has a broad attack surface.

Affected Products

  • SQLite (versions prior to 3.32.3)
  • Apple iOS, iPadOS, macOS, tvOS, watchOS, and iCloud for Windows
  • Canonical Ubuntu Linux 20.04 LTS
  • Oracle MySQL, Communications Messaging Server, and Enterprise Manager Ops Center
  • Oracle Communications Cloud Native Core Policy and Communications Network Charging and Control
  • Siemens SINEC Infrastructure Network Services

Discovery Timeline

  • June 27, 2020 - CVE-2020-15358 published to NVD
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2020-15358

Vulnerability Analysis

This vulnerability exists within SQLite's query optimization subsystem, specifically in the select.c source file. The query-flattener is an optimization technique used to simplify nested SELECT statements by merging subqueries into the outer query when certain conditions are met. However, the implementation incorrectly applies transitive properties during constant propagation, leading to memory safety violations.

When processing complex queries with multiple SELECT statements and ORDER BY clauses, the optimizer's multiSelectOrderBy function can write beyond allocated heap buffer boundaries. This out-of-bounds write occurs because the constant propagation logic makes incorrect assumptions about data relationships, resulting in buffer size miscalculations.

The vulnerability requires local access and the ability to execute crafted SQL statements against a vulnerable SQLite instance. While the primary impact is denial of service through application crashes, heap overflow vulnerabilities can potentially be leveraged for more severe attacks depending on the exploitation context and memory layout.

Root Cause

The root cause lies in the query-flattener's constant propagation logic within select.c. When the optimizer attempts to flatten nested queries, it uses transitive properties to propagate constant values across query boundaries. The flaw occurs when these transitive relationships are incorrectly applied, causing the multiSelectOrderBy function to miscalculate buffer sizes needed for ordering operations. This results in heap memory being overwritten beyond its allocated bounds when processing ORDER BY clauses across multiple SELECT statements.

Attack Vector

The attack requires local access to execute SQL queries against a SQLite database. An attacker must craft a malicious SQL query that triggers the vulnerable code path in the query optimizer. The query would typically involve:

  1. Multiple nested SELECT statements that qualify for query flattening
  2. ORDER BY clauses that exercise the multiSelectOrderBy optimization
  3. Constant values or expressions that trigger the faulty transitive property handling

Applications that process untrusted SQL input or allow users to construct complex queries are most at risk. This includes database management tools, content management systems with custom query interfaces, and applications embedding SQLite for local data storage.

The vulnerability mechanism can be understood by examining how the query optimizer processes nested SELECT statements with ORDER BY clauses. When flattening occurs, the constant propagation incorrectly calculates buffer requirements, leading to the heap overflow condition. For detailed technical information, see the SQLite Ticket View and the SQLite Version Change Timeline.

Detection Methods for CVE-2020-15358

Indicators of Compromise

  • Application crashes or unexpected terminations in processes using SQLite for database operations
  • Memory corruption errors or segmentation faults in applications with SQLite dependencies
  • Abnormal SQL query patterns involving deeply nested SELECT statements with ORDER BY clauses
  • Core dumps or crash logs indicating heap memory violations in SQLite library functions

Detection Strategies

  • Monitor for SQLite-related crashes using application crash reporting systems and process monitors
  • Implement input validation for SQL queries to detect complex nested SELECT statements with ORDER BY clauses
  • Use memory sanitizers (AddressSanitizer, Valgrind) during development and testing to identify heap overflows
  • Deploy application-level logging to capture and analyze SQL query patterns before execution

Monitoring Recommendations

  • Enable crash reporting and alerting for applications that depend on SQLite for data storage
  • Implement SQL query complexity limits to prevent excessively nested or complex queries
  • Monitor system logs for segmentation faults or memory access violations in SQLite-dependent processes
  • Track SQLite library versions across the environment to identify vulnerable deployments

How to Mitigate CVE-2020-15358

Immediate Actions Required

  • Upgrade SQLite to version 3.32.3 or later across all affected systems and applications
  • Apply vendor patches for affected Apple operating systems (iOS, iPadOS, macOS, tvOS, watchOS) and iCloud for Windows
  • Update Canonical Ubuntu Linux 20.04 LTS using the security update referenced in USN-4438-1
  • Apply Oracle Critical Patch Updates for affected Oracle products including MySQL and Communications components
  • Update Siemens SINEC Infrastructure Network Services per Siemens Security Advisory SSA-389290

Patch Information

The vulnerability was addressed in SQLite version 3.32.3. The fix corrects the transitive property handling in the constant propagation logic within the query-flattener optimization. Detailed commit information is available at the SQLite Version Information page.

Multiple vendors have released patches:

  • Apple: Security updates documented in HT211843, HT211844, HT211847, HT211850, HT211931, and HT212147
  • Oracle: Addressed in October 2020, January 2021, April 2021, and April 2022 Critical Patch Updates
  • Gentoo: See GLSA 202007-26
  • NetApp: Referenced in NTAP-20200709-0001

Workarounds

  • Restrict the ability to execute arbitrary SQL queries in affected applications where patching is not immediately possible
  • Implement query complexity limits to reject deeply nested SELECT statements
  • Deploy application-level sandboxing to limit the impact of potential crashes or memory corruption
  • Consider disabling query-flattener optimization if the SQLite build configuration allows (not recommended for production)
bash
# Check current SQLite version
sqlite3 --version

# On Ubuntu/Debian, update SQLite
sudo apt-get update
sudo apt-get install sqlite3 libsqlite3-0

# Verify the update
sqlite3 --version
# Should show 3.32.3 or later

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechSqlite

  • SeverityMEDIUM

  • CVSS Score5.5

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-787
  • Technical References
  • Full Disclosure Message #32

  • Full Disclosure Message #19

  • Full Disclosure Message #20

  • Full Disclosure Message #22

  • Full Disclosure Message #14

  • Siemens Security Advisory SSA-389290

  • Gentoo GLSA 2020-07-26

  • NetApp Security Advisory NTAP-20200709-0001

  • Apple Support Article HT211843

  • Apple Support Article HT211844

  • Apple Support Article HT211847

  • Apple Support Article HT211850

  • Apple Support Article HT211931

  • Apple Support Article HT212147

  • Ubuntu Security Notice USN-4438-1

  • Oracle Critical Patch Update January 2021

  • Oracle Critical Patch Update October 2020
  • Vendor Resources
  • Oracle Critical Patch Update April 2021

  • Oracle Critical Patch Update April 2022

  • SQLite Version Information 10fa79d00f8091e5

  • SQLite Version Change Timeline

  • SQLite Ticket View 8f157e8010
  • Related CVEs
  • CVE-2025-6965: SQLite Buffer Overflow Vulnerability

  • CVE-2023-7104: SQLite Heap-Based Buffer Overflow Flaw

  • CVE-2025-3277: SQLite Buffer Overflow Vulnerability

  • CVE-2025-29087: SQLite Buffer Overflow Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English