CVE-2018-25270: Unauthenticated RCE in ThinkPHP 5.0.23 via invokeFunction Routing Parameter
- Vendor
- Thinkphp
CVE-2018-25270 is a critical remote code execution vulnerability in ThinkPHP 5.0.23. The issue is caused by improper validation and sanitization in ThinkPHP's routing and controller handling, specifically allowing attacker-controlled routing parameters to reach the invokeFunction method. By sending a crafted HTTP request to the application's index.php endpoint, an unauthenticated attacker can supply arbitrary PHP function names and arguments, including dangerous functions such as system or exec. This results in arbitrary PHP code execution and operating system command execution in the context of the vulnerable web application process. The vulnerable code path is reachable in a single request and does not require authentication.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows full remote code execution on the target ThinkPHP application server with the privileges of the web application process. An attacker can execute arbitrary system commands, access command output in the HTTP response, compromise application data, modify server-side content, deploy webshells or other malware, establish persistence, pivot further into the environment, and disrupt service availability. Given the CVSS 3.1 vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, the vulnerability has high impact across confidentiality, integrity, and availability.
Mitigation
If you can’t patch tonight, do this now.
If immediate patching is not possible, restrict or remove external access to vulnerable ThinkPHP applications, especially direct exposure of the index.php endpoint to untrusted networks. Apply compensating controls such as WAF rules or reverse-proxy filtering to block known malicious routing patterns and requests attempting to invoke functions through URL parameters. Monitor for exploitation attempts targeting ThinkPHP routing behavior, review web server and application logs for suspicious requests to index.php, and inspect affected hosts for signs of post-exploitation such as webshells, unexpected processes, or command execution artifacts. These measures reduce exposure but do not eliminate the underlying vulnerability.
Remediation
Patch, then assume compromise.
Upgrade ThinkPHP 5.0.23 and earlier to ThinkPHP 5.0.24 or later, as the content indicates the invokeFunction routing-parameter RCE affecting 5.0.23 and earlier is fixed in 5.0.24. Because ThinkPHP 5.x contains multiple overlapping RCE issues across nearby minor versions, organizations should verify the exact deployed version and ensure they are not still exposed to related flaws affecting 5.0.22 and earlier or 5.1.29 and earlier. Confirm that internet-exposed instances are fully updated and validate that vulnerable routing behavior is no longer reachable after patching.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2018-25270 exploited in the wild?
- Yes. As of Sep 25, 2026, Mallory has reports of exploitation in the wild.
- Is there a public exploit for CVE-2018-25270?
- Yes. As of Sep 25, 2026, Mallory has reports of a public exploit for CVE-2018-25270.
- Is there a patch for CVE-2018-25270?
- Upgrade ThinkPHP 5.0.23 and earlier to ThinkPHP 5.0.24 or later, as the content indicates the invokeFunction routing-parameter RCE affecting 5.0.23 and earlier is fixed in 5.0.24. Because ThinkPHP 5.x contains multiple overlapping RCE issues across nearby minor versions, organizations should verify the exact deployed version and ensure they are not still exposed to related flaws affecting 5.0.22 and earlier or 5.1.29 and earlier.
- What products are affected by CVE-2018-25270?
- Thinkphp.
- How severe is CVE-2018-25270?
- CVE-2018-25270 has a CVSS v4 score of 9.3 (Critical) and an EPSS score of 0.91% (61st percentile) as of Sep 25, 2026.
Recent activity
6 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.