CVE-2017-15286
High · 7.5CVSS
7.5
EPSS
2.9%
Published
Oct 12, 2017
CISA due date
—
Cloudanix analysis
A bug in database software can make programs crash when they receive certain unexpected data, potentially disrupting services until the software is updated.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
NULL pointer dereference in tableColumnList within shell.c triggered when sqlite3_step(pStmt) does not return SQLITE_ROW, leaving a data structure uninitialized and causing a crash.
Why it matters to the business
Applications relying on the affected database packages may experience unexpected crashes and service interruptions, with potential for denial of service in environments processing untrusted queries; the flaw has been present for years with public exploit code available.
How an attack unfolds
An attacker supplies specially crafted input to the SQLite shell interface that causes tableColumnList to skip initialization when sqlite3_step fails to return a row; public exploits exist that trigger the dereference to crash the process, and while no named threat actors are associated, the long-public nature allows easy integration into automated attack tools targeting vulnerable MySQL package deployments.
How to fix it
Upgrade affected packages to the fixed versions: mysql-8.0, mysql-8.0-dev, mysql-8.0-oci-entrypoint, mysql-8.0-oci-entrypoint-compat, and mysql-8.0-client to 8.0.38-r0 or later; avoid using unpatched SQLite shell interfaces with untrusted inputs until updated.
How to confirm the fix worked
Confirm package versions are at or above the listed fixed releases, test that tableColumnList paths no longer dereference NULL under the described sqlite3_step conditions, and verify no crash occurs with previously triggering inputs.
Typical attack path
- Identify an exposed or locally accessible instance using an affected MySQL package version with the vulnerable SQLite shell component.
- Craft input that exercises tableColumnList such that sqlite3_step returns a non-row result.
- Trigger the uninitialized structure dereference to cause a NULL pointer crash.
- Repeat or automate to sustain denial of service.
How to detect it
Review application and system logs for segmentation faults or abrupt process terminations in mysql or sqlite3 shell processes; examine any available core dumps or stack traces referencing tableColumnList or shell.c for signs of prior exploitation attempts.
What your security team should do
- Prioritize upgrading all listed MySQL packages to the 8.0.38-r0 fixed releases immediately given the public exploit availability.
- Scan environments for any remaining pre-8.0.38-r0 instances and isolate them from untrusted query sources.
- Implement input validation or sandboxing around SQLite shell usage as a temporary control.
- Monitor for crashes in database processes as an operational indicator of potential exposure.
The record
SQLite 3.20.1 has a NULL pointer dereference in tableColumnList in shell.c because it fails to consider certain cases where `sqlite3_step(pStmt)==SQLITE_ROW` is false and a data structure is never initialized.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.6 | sqlite | 0 | 3.20.1-r1 |
| Debian:10 | sqlite3 | 0 | 3.20.1-2 |
| Debian:11 | sqlite3 | 0 | 3.20.1-2 |
| Debian:12 | sqlite3 | 0 | 3.20.1-2 |
| Debian:13 | sqlite3 | 0 | 3.20.1-2 |
| Ubuntu:18.04:LTS | sqlite3 | 0 | 3.22.0-1 |
Related vulnerabilities
- CVE-2017-10989 The getNodeSize function in ext/rtree/rtree.c in SQLite through 3.19.3, as used in GDAL… Also affects sqlite
- CVE-2020-35527 In SQLite 3.31.1, there is an out of bounds access problem through ALTER TABLE for views… Also affects sqlite3
- CVE-2020-35525 In SQlite 3.31.1, a potential null pointer derreference was found in the INTERSEC query… Also affects sqlite3
- CVE-2022-35737 SQLite 1.0.12 through 3.39.x before 3.39.2 sometimes allows an array-bounds overflow if… Also affects sqlite3
- CVE-2019-19244 sqlite3Select in select.c in SQLite 3.30.1 allows a crash if a sub-select uses both… Also affects sqlite3
- CVE-2019-9937 In SQLite 3.27.2, interleaving reads and writes in a single transaction with an fts5… Also affects sqlite3
- CVE-2019-9936 In SQLite 3.27.2, running fts5 prefix queries inside a transaction could trigger a… Also affects sqlite3
- CVE-2017-13685 The dump_callback function in SQLite 3.20.0 allows remote attackers to cause a denial of… Also affects sqlite3