CVE-2019-25782: TopThink ThinkPHP · Remote code execution
Exploitation: None known · CVSS 9.8 Critical · Unauthenticated · Published 2026-11-18
Description
ThinkPHP 5.0.0 before 5.0.24 contains a code injection vulnerability that allows unauthenticated attackers to execute commands by setting _method=__construct in POST data to overwrite the Request filter property. Attackers can send POST requests to endpoints reached via ?s=captcha or ?s=index/index/index with filter[]=system and server[REQUEST_METHOD] values to execute arbitrary system commands. Exploitation evidence was first observed by the Shadowserver Foundation on 2023-10-14.
Enclave's analysis
ThinkPHP 5.0.0 through 5.0.23 lets an unauthenticated attacker send a single POST with _method=__construct and filter[]=system to hijack the framework's own default routes and run arbitrary OS commands. Working payloads against the ?s=captcha and ?s=index/index/index endpoints have been public since 2019, with a reproducible Docker lab and a maintained Nuclei template. The affected branch is long end-of-life, so the remaining exposed population is shrinking but likely unpatched by definition. Upgrade to 5.0.24+ or move off the 5.0.x branch entirely.
Fix
Upgrade ThinkPHP to 5.0.24; ThinkPHP (TopThink framework) to 5.0.24.
Affected versions
| Product | Vulnerable | Fixed in |
|---|---|---|
| ThinkPHP | 5.0.0 before 5.0.24 | 5.0.24 |
| ThinkPHP (TopThink framework) | >=5.0.0, <5.0.24 | 5.0.24 |