CVE-2018-18546 ThinkPHP SQLi Vulnerability

Critical 9.8 Published Updated

SQL injection in ThinkPHP allows attackers to manipulate database queries via the order parameter, potentially exposing or modifying data.

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-18546?

CVE-2018-18546 is a critical SQL injection vulnerability in n/a, published on 21 Oct 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

ThinkPHP 3.2.4 has SQL Injection via the order parameter because the Library/Think/Db/Driver.class.php parseOrder function mishandles the key variable.

Weakness: CWE-89

Which versions are affected by CVE-2018-18546?

2 open source packages ship an affected version, including topthink/framework. It affects 1 product.

PackageAffectedFixed in
topthink/framework PackagistAll versions to 3.2.4None
topthink/framework PackagistAll versions to 3.2.4None

Products include Thinkphp Thinkphp.

How do I fix CVE-2018-18546?

No fix has been published for CVE-2018-18546 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-18546 being exploited?

There is no known exploitation of CVE-2018-18546 in the wild and no public exploit code.

Sources

Also known as GHSA-j7g8-3qqg-8cvm.

Is CVE-2018-18546 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free