CVE-2019-19926
📋 TL;DR
This CVE describes a NULL pointer dereference vulnerability in SQLite's multiSelect function that can cause denial of service or potentially allow arbitrary code execution. The vulnerability affects SQLite 3.30.1 and exists due to incomplete fixes for CVE-2019-19880. Applications using vulnerable SQLite versions for database operations are affected.
💻 Affected Systems
- SQLite
- Applications embedding SQLite
- Operating systems with SQLite packages
📦 What is this software?
Backports Sle by Opensuse
Leap by Opensuse
Sinec Infrastructure Network Services by Siemens
View all CVEs affecting Sinec Infrastructure Network Services →
Sqlite by Sqlite
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise if combined with other vulnerabilities or memory corruption techniques.
Likely Case
Application crash or denial of service when processing malicious SQL queries containing window functions.
If Mitigated
Limited to application instability if proper input validation and error handling are implemented.
🎯 Exploit Status
Exploitation requires ability to execute SQL queries against vulnerable SQLite instances, typically through application interfaces.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: SQLite 3.31.0 and later
Vendor Advisory: https://www.sqlite.org/releaselog/3_31_0.html
Restart Required: Yes
Instructions:
1. Download SQLite 3.31.0 or later from sqlite.org. 2. Replace existing SQLite library with patched version. 3. Recompile applications using SQLite if statically linked. 4. Restart affected services.
🔧 Temporary Workarounds
Input validation for SQL queries
allImplement strict input validation and sanitization for all SQL queries, especially those containing window functions.
Disable window functions if unused
linuxIf application doesn't require SQL window functions, consider disabling them through compile-time options.
Compile SQLite with -DSQLITE_OMIT_WINDOWFUNC
🧯 If You Can't Patch
- Implement application-level input validation and query sanitization
- Deploy WAF rules to block suspicious SQL patterns containing window functions
🔍 How to Verify
Check if Vulnerable:
Check SQLite version: sqlite3 --version should show 3.30.1. Applications using this version are vulnerable.
Check Version:
sqlite3 --version
Verify Fix Applied:
Verify SQLite version is 3.31.0 or higher: sqlite3 --version
📡 Detection & Monitoring
Log Indicators:
- Application crashes with segmentation faults
- SQL query errors related to window functions
- Unexpected process termination during database operations
Network Indicators:
- Repeated SQL queries containing window function syntax
- Unusual database query patterns
SIEM Query:
source="application.log" AND ("segmentation fault" OR "NULL pointer" OR "window function error")
🔗 References
- http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00010.html
- http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00015.html
- http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00025.html
- https://access.redhat.com/errata/RHSA-2020:0514
- https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf
- https://github.com/sqlite/sqlite/commit/8428b3b437569338a9d1e10c4cd8154acbe33089
- https://security.netapp.com/advisory/ntap-20200114-0003/
- https://usn.ubuntu.com/4298-1/
- https://usn.ubuntu.com/4298-2/
- https://www.debian.org/security/2020/dsa-4638
- https://www.oracle.com/security-alerts/cpuapr2020.html
- http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00010.html
- http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00015.html
- http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00025.html
- https://access.redhat.com/errata/RHSA-2020:0514
- https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf
- https://github.com/sqlite/sqlite/commit/8428b3b437569338a9d1e10c4cd8154acbe33089
- https://security.netapp.com/advisory/ntap-20200114-0003/
- https://usn.ubuntu.com/4298-1/
- https://usn.ubuntu.com/4298-2/
- https://www.debian.org/security/2020/dsa-4638
- https://www.oracle.com/security-alerts/cpuapr2020.html