CVE-2020-20120

ThinkPHP v3.2.3 and below contains a SQL injection vulnerability which is triggered when the array is not passed to the "where" and "query" methods

published September 28, 2021

CVSS
—
EPSS
2%
Percentile
78.4
In the wild
Unconfirmed
What it is

⚠️ A missing array in the wrong place opens the door wide! ThinkPHP v3.2.3 and below can be exploited through SQL injection just by skipping a tiny detail. 🔥 Imagine a restaurant where the chef receives a vague order with no specific ingredients. Instead of cooking what the customer wanted, they could use anything from the pantry, potentially serving up something disastrous! With this SQL injection vulnerability, an attacker could manipulate database queries, leading to unauthorized data access or even total control of the database. They could wreak havoc on your application, potentially exposing sensitive information or causing data loss. Yikes!

Put simply

Imagine a restaurant where the chef receives a vague order with no specific ingredients. Instead of cooking what the customer wanted, they could use anything from the pantry, potentially serving up something disastrous! The flaw arises when the `where` and `query` methods in ThinkPHP don't receive an array input, allowing attackers to inject malicious SQL commands. This means they can trick the application into executing unwanted queries against the database.

What to do

With this SQL injection vulnerability, an attacker could manipulate database queries, leading to unauthorized data access or even total control of the database. They could wreak havoc on your application, potentially exposing sensitive information or causing data loss. Yikes! To safeguard your application, upgrade to ThinkPHP v3.2.4 or later immediately. Additionally, ensure all inputs are validated and properly sanitized to prevent SQL injection attacks. A proactive approach is key! You've got this! A quick update and some careful input handling will keep your application secure. 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.01807 · 78.4th percentile
Published
2021-09-28T22:05Z
EPSS history
Timeline
  • 28 SEP 22:05Z
    ThinkPHP v3.2.3 and below contains a SQL injection vulnerability which is triggered when the array is not passed to the "where" and "query" methods
    cvelistv5