CVE-2019-5018
High · 8.1CVSS
8.1
EPSS
6.7%
Published
May 10, 2019
CISA due date
—
Cloudanix analysis
A long-known flaw in a database library used by some container tools could let attackers run their own code if they can send specially made database commands.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- High
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free condition in SQLite window function handling allows a crafted SQL statement to reference freed memory, enabling potential arbitrary code execution in the process context.
Why it matters to the business
Systems that process untrusted SQL queries face elevated risk of remote code execution and data compromise; the age of the issue combined with available exploits increases urgency for organizations still running affected container tooling packages.
How an attack unfolds
An attacker supplies a malicious SQL command containing a window function sequence that triggers the use-after-free; successful exploitation can corrupt memory structures to achieve code execution within the SQLite process, which in container environments may lead to container escape or host access.
How to fix it
Upgrade cri-tools, crictl, and critest packages (Chainguard and Wolfi) to version 1.29.0-r2 or later; rebuild and redeploy any container images that embed the vulnerable SQLite dependency.
How to confirm the fix worked
Verify package versions match the fixed releases, run regression tests with known window-function queries, and confirm absence of the vulnerable SQLite binary in runtime images.
Typical attack path
- Locate an application or service exposing SQLite to attacker-controlled SQL input
- Craft and submit a window-function SQL payload designed to trigger the use-after-free
- Leverage the resulting memory corruption to achieve code execution
- Establish persistence or move laterally within the container or host environment
How to detect it
Review application and database logs for unusual window-function queries or repeated crashes in SQLite processes; correlate with process creation events following SQL execution.
What your security team should do
- Immediately update all listed packages to the fixed versions across build pipelines and runtime environments
- Scan container registries and CI/CD artifacts for any remaining vulnerable package versions
- Add dependency pinning and automated update checks for SQLite-containing components
- Review applications that accept user-supplied SQL for safer query construction patterns
The record
An exploitable use after free vulnerability exists in the window function functionality of Sqlite3 3.26.0. A specially crafted SQL command can cause a use after free vulnerability, potentially resulting in remote code execution. An attacker can send a malicious SQL command to trigger this vulnerability.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.10 | sqlite | 0 | 3.28.0-r0 |
| Alpine:v3.11 | sqlite | 0 | 3.28.0-r0 |
| Alpine:v3.12 | sqlite | 0 | 3.28.0-r0 |
| Alpine:v3.13 | sqlite | 0 | 3.28.0-r0 |
| Alpine:v3.14 | sqlite | 0 | 3.28.0-r0 |
| Alpine:v3.15 | sqlite | 0 | 3.28.0-r0 |
| Alpine:v3.16 | sqlite | 0 | 3.28.0-r0 |
| Alpine:v3.17 | sqlite | 0 | 3.28.0-r0 |
| Alpine:v3.18 | sqlite | 0 | 3.28.0-r0 |
| Alpine:v3.19 | sqlite | 0 | 3.28.0-r0 |
| Alpine:v3.20 | sqlite | 0 | 3.28.0-r0 |
| Alpine:v3.21 | sqlite | 0 | 3.28.0-r0 |
| Alpine:v3.22 | sqlite | 0 | 3.28.0-r0 |
| Alpine:v3.9 | sqlite | 0 | 3.28.0-r0 |
| Debian:11 | sqlite3 | 0 | 3.27.2-3 |
| Debian:12 | sqlite3 | 0 | 3.27.2-3 |
| Debian:13 | sqlite3 | 0 | 3.27.2-3 |
| 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 |
| Ubuntu:16.04:LTS | sqlite3 | 0 | 3.11.0-1ubuntu1.3 |
| Ubuntu:18.04:LTS | sqlite3 | 0 | 3.22.0-1ubuntu0.2 |
Related vulnerabilities
- CVE-2020-11655 SQLite through 3.31.1 allows attackers to cause a denial of service (segmentation fault)… Also affects sqlite
- CVE-2019-19242 SQLite 3.30.1 mishandles pExpr->y.pTab, as demonstrated by the TK_COLUMN case in… Also affects sqlite
- CVE-2019-19244 sqlite3Select in select.c in SQLite 3.30.1 allows a crash if a sub-select uses both… Also affects sqlite
- CVE-2019-16168 In SQLite through 3.29.0, whereLoopAddBtreeIndex in sqlite3.c can crash a browser or… Also affects sqlite
- CVE-2019-8457 SQLite3 from 3.6.0 to and including 3.27.2 is vulnerable to heap out-of-bound read in the… Also affects sqlite
- CVE-2022-35737 SQLite 1.0.12 through 3.39.x before 3.39.2 sometimes allows an array-bounds overflow if… Also affects sqlite
- CVE-2025-29087 Sqlite 3.49.0 is susceptible to integer overflow through the concat function. Also affects sqlite
- CVE-2025-6965 There exists a vulnerability in SQLite versions before 3.50.2 where the number of… Also affects sqlite