Skip to main content
Mallory
CriticalPublic exploitVulnerability

CVE-2018-25270: Unauthenticated RCE in ThinkPHP 5.0.23 via invokeFunction Routing Parameter

Published Apr 22, 2026 · Updated 2 months ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS9.3Critical · v4
EPSS0.91%61st percentile
CISA KEVNoNot listed
In the wildReported1 exploitation record in Mallory
Vendor
Thinkphp
IdentifiersCVE-2018-25270CWE-639 · Authorization Bypass Through…

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.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

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.

Public exploits

Exploits

No public exploits tracked yet. Mallory keeps watching.

View more in app →
No public exploit code observed for this vulnerability. Mallory keeps watching.
Exposure surface

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.

VendorProductType
ThinkphpThinkphpapplication
FAQ

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.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity4Community discussion across Reddit, Mastodon, and other social sources.