CVE-2018-18530 ThinkPHP SQLi Vulnerability
Attackers can execute arbitrary SQL commands via the count parameter in ThinkPHP, potentially reading or modifying database contents.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2018-18530?
CVE-2018-18530 is a critical SQL injection vulnerability in n/a, published on 19 Oct 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
ThinkPHP 5.1.25 has SQL Injection via the count parameter because the library/think/db/Query.php aggregate function mishandles the aggregate variable. NOTE: a backquote character is required in the attack URI.
Weakness: CWE-89
Which versions are affected by CVE-2018-18530?
2 open source packages ship an affected version, including topthink/framework. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
topthink/framework Packagist | All versions to 5.1.25 | None |
topthink/framework Packagist | All versions to 5.1.25 | None |
Products include Thinkphp Thinkphp.
How do I fix CVE-2018-18530?
No fix has been published for CVE-2018-18530 yet. Limit exposure of the affected software until one is available.
Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.
Is CVE-2018-18530 being exploited?
There is no known exploitation of CVE-2018-18530 in the wild and no public exploit code.
Other vulnerabilities in n/a
Sources
Also known as GHSA-7xfj-4jpg-58vf.