Unauthenticated code execution via routing function invocation
Published Apr 22, 2026 · Updated Apr 22, 2026
Remote code execution in ThinkPHP 5.0.23 and 5.1.31 allows remote attackers to execute arbitrary PHP code through crafted routing parameters. The index.php route resolves \think\app\invokefunction and passes attacker-controlled function and vars values to call_user_func_array, enabling calls such as system. No authentication or user interaction is required, and resulting commands run with the PHP application process privileges.
Summary
What happened
Remote code execution in ThinkPHP 5.0.23 and 5.1.31 allows remote attackers to execute arbitrary PHP code through crafted routing parameters. The index.php route resolves \think\app\invokefunction and passes attacker-controlled function and vars values to call_user_func_array, enabling calls such as system. No authentication or user interaction is required, and resulting commands run with the PHP application process privileges.
The record
- CVE
- CVE-2018-25270
- Published
- Apr 22, 2026
- Updated
- Apr 22, 2026
- Vendor
- ThinkPHP
- Product
- ThinkPHP
- Classifications
- CWE-639, T1190
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Apr 22, 2026CVE publishedPublication date reported by the CVE source.
- Apr 22, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=5.0.23
- Affected versionversion=5.1.31
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- ThinkPHP 5.0.23/5.1.31 Remote Code Executionfunctional · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo