CVE-2020-13630
📋 TL;DR
CVE-2020-13630 is a use-after-free vulnerability in SQLite's FTS3 extension that can lead to memory corruption and potential code execution. It affects applications using SQLite with the FTS3 snippet feature enabled. Attackers could exploit this to crash applications or execute arbitrary code.
💻 Affected Systems
- SQLite
- Applications embedding SQLite (Chrome, Firefox, Android, iOS apps, etc.)
📦 What is this software?
Communications Network Charging And Control by Oracle
View all CVEs affecting Communications Network Charging And Control →
Communications Network Charging And Control by Oracle
View all CVEs affecting Communications Network Charging And Control →
Fedora by Fedoraproject
Icloud by Apple
Ipados by Apple
Itunes by Apple
Macos by Apple
macOS is Apple's desktop and laptop operating system powering Mac computers used by millions of professionals, developers, creative professionals, and enterprise users worldwide. Built on a Unix foundation with the Darwin kernel and modern Cocoa frameworks, macOS delivers a seamless ecosystem integr...
Learn more about Macos →Sinec Infrastructure Network Services by Siemens
View all CVEs affecting Sinec Infrastructure Network Services →
Solidfire\, Enterprise Sds \& Hci Storage Node by Netapp
View all CVEs affecting Solidfire\, Enterprise Sds \& Hci Storage Node →
Sqlite by Sqlite
Tvos by Apple
Ubuntu Linux by Canonical
Ubuntu Linux by Canonical
Ubuntu Linux by Canonical
Ubuntu Linux by Canonical
Watchos by Apple
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise, data theft, or ransomware deployment.
Likely Case
Application crash (denial of service) or limited memory corruption leading to unstable behavior.
If Mitigated
Application crash without code execution if memory protections like ASLR are effective.
🎯 Exploit Status
Exploitation requires control over SQL queries using the snippet() function. Multiple proof-of-concept examples exist in disclosure references.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: SQLite 3.32.0 and later
Vendor Advisory: https://sqlite.org/releaselog/3_32_0.html
Restart Required: Yes
Instructions:
1. Download SQLite 3.32.0 or later from sqlite.org. 2. Replace vulnerable SQLite library. 3. Recompile applications using SQLite. 4. Restart affected services and applications.
🔧 Temporary Workarounds
Disable FTS3 Extension
allPrevent use of vulnerable snippet() function by disabling FTS3 extension at compile time.
Compile SQLite with -DSQLITE_ENABLE_FTS3=0 or -DSQLITE_ENABLE_FTS3_PARENTHESIS=0
Application-Level Filtering
allBlock or sanitize SQL queries containing snippet() function calls.
🧯 If You Can't Patch
- Implement strict input validation to block snippet() function calls in SQL queries
- Deploy memory protection mechanisms (ASLR, DEP) to reduce exploit effectiveness
🔍 How to Verify
Check if Vulnerable:
Check SQLite version: sqlite3 --version. If version < 3.32.0 and FTS3 is enabled, system is vulnerable.
Check Version:
sqlite3 --version
Verify Fix Applied:
Verify SQLite version is ≥ 3.32.0 and test snippet() function with known malicious queries.
📡 Detection & Monitoring
Log Indicators:
- Application crashes with memory access violations
- SQL errors mentioning fts3EvalNextRow or snippet()
Network Indicators:
- Unusual SQL query patterns containing snippet() function
SIEM Query:
source="application.log" AND ("segmentation fault" OR "access violation" OR "fts3EvalNextRow")
🔗 References
- http://seclists.org/fulldisclosure/2020/Dec/32
- http://seclists.org/fulldisclosure/2020/Nov/19
- http://seclists.org/fulldisclosure/2020/Nov/20
- http://seclists.org/fulldisclosure/2020/Nov/22
- https://bugs.chromium.org/p/chromium/issues/detail?id=1080459
- https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf
- https://lists.debian.org/debian-lts-announce/2020/08/msg00037.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L7KXQWHIY2MQP4LNM6ODWJENMXYYQYBN/
- https://security.FreeBSD.org/advisories/FreeBSD-SA-20:22.sqlite.asc
- https://security.gentoo.org/glsa/202007-26
- https://security.netapp.com/advisory/ntap-20200608-0002/
- https://sqlite.org/src/info/0d69f76f0865f962
- https://support.apple.com/kb/HT211843
- https://support.apple.com/kb/HT211844
- https://support.apple.com/kb/HT211850
- https://support.apple.com/kb/HT211931
- https://support.apple.com/kb/HT211935
- https://support.apple.com/kb/HT211952
- https://usn.ubuntu.com/4394-1/
- https://www.oracle.com/security-alerts/cpujul2020.html
- https://www.oracle.com/security-alerts/cpuoct2020.html
- http://seclists.org/fulldisclosure/2020/Dec/32
- http://seclists.org/fulldisclosure/2020/Nov/19
- http://seclists.org/fulldisclosure/2020/Nov/20
- http://seclists.org/fulldisclosure/2020/Nov/22
- https://bugs.chromium.org/p/chromium/issues/detail?id=1080459
- https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf
- https://lists.debian.org/debian-lts-announce/2020/08/msg00037.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L7KXQWHIY2MQP4LNM6ODWJENMXYYQYBN/
- https://security.FreeBSD.org/advisories/FreeBSD-SA-20:22.sqlite.asc
- https://security.gentoo.org/glsa/202007-26
- https://security.netapp.com/advisory/ntap-20200608-0002/
- https://sqlite.org/src/info/0d69f76f0865f962
- https://support.apple.com/kb/HT211843
- https://support.apple.com/kb/HT211844
- https://support.apple.com/kb/HT211850
- https://support.apple.com/kb/HT211931
- https://support.apple.com/kb/HT211935
- https://support.apple.com/kb/HT211952
- https://usn.ubuntu.com/4394-1/
- https://www.oracle.com/security-alerts/cpujul2020.html
- https://www.oracle.com/security-alerts/cpuoct2020.html