CVE-2016-15020: SQL Injection in liftkit/database
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.1644%
CWE
Published
1/16/2023
Updated
10/20/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| liftkit/database | composer | < 2.13.2 | 2.13.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how processOrderBy() handled the 'direction' parameter in ORDER BY clauses. The pre-patch code (line 1067 in diff) directly used $orderBy['direction'] from user input. Attackers could supply malicious SQL operators instead of valid ASC/DESC directions. The patch adds validation by comparing against class constants (QUERY_ORDER_ASC/DESC), demonstrating the original lack of input filtering. The CWE-89 classification and commit message explicitly confirm this SQL injection vector in the orderBy handling.