Summary
ThinkPHP 2.0 through 2.2 and 3.0 (Lite mode) contain an eval injection vulnerability in the Dispatcher's PATH_INFO parsing. It allows an unauthenticated attacker to execute arbitrary code on the server; the CVSS 4.0 score is 9.3 (critical).
What happened
The ThinkPHP Dispatcher processes PATH_INFO using preg_replace with the /e modifier and a double-quoted replacement string (CWE-95, improper neutralization of directives in dynamically evaluated code). An unauthenticated attacker can send crafted requests to index.php with an 's' parameter containing PHP expressions, leading to arbitrary code execution on the server. The source states that the Shadowserver Foundation first observed evidence of exploitation on 2023-10-14.
Why it matters
It allows arbitrary code execution on the server over the network without authentication, with high impact on confidentiality, integrity and availability. The CVSS 4.0 score is 9.3 (vector CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N), assigned by VulnCheck as CNA, and the severity is critical. The source refers to exploitation evidence observed by Shadowserver, but CISA's KEV catalog does not list this CVE as exploited. The source does not state that this is a zero-day.
Affected products and versions
TopThink ThinkPHP: versions >= 2.0 and <= 2.2; and version 3.0 (Lite mode). The source does not state a fixed version.
| Product | Versions | Fixed in |
|---|---|---|
| TopThink ThinkPHP | >= 2.0, <= 2.2 | — |
| TopThink ThinkPHP | 3.0 | — |
Action recommended by the source
The source does not state a vendor fix or mitigation. Readers may consult the VulnCheck advisory and the CVE references for further technical information.
Sources and references
- http://web.archive.org/web/20140201221754/http://www.jb51.net:80/softjc/43550.html — CVE Program
- https://github.com/vulhub/vulhub/tree/master/thinkphp/2-rce — CVE Program
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/vulnerabilities/thinkphp/thinkphp-2-rce.yaml — CVE Program
- https://www.vulncheck.com/advisories/thinkphp-2-x-3.0-lite-unauthenticated-rce-via-dispatcher-path-info — CVE Program
Weaknesses (CWE): CWE-95
Relevant change history
Published
Advisory published.