Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
9.3
CVE-2012-20007: ThinkPHP lets attackers run code via URL
CVE-2012-20007 · published 4 days ago
Summary
Versions 2.0 through 2.2 and 3.0 in Lite mode can execute arbitrary server commands when a specially crafted request is sent to index.php. An attacker does not need to log in and can inject PHP code through the ‘s’ parameter, potentially taking full control of the web server. Apply the latest security updates from the vendor or replace the vulnerable dispatcher logic with a safe alternative, and restrict public access to the affected entry point until the fix is in place.
What to do
The CVE record does not list a fixed version. Check the vendor's site or the advisory links below - a fix may already be released.
Affected software
| Vendor | Product | Affected versions |
|---|---|---|
| topthink | thinkphp | <= 2.2 |
Original advisory text
ThinkPHP 2.x / 3.0 Lite Unauthenticated RCE via Dispatcher PATH_INFO
ThinkPHP 2.0 through 2.2 and 3.0 Lite mode contains an eval injection vulnerability in the Dispatcher PATH_INFO parsing, which uses preg_replace with the /e modifier and a double-quoted replacement. Unauthenticated attackers can send crafted requests to index.php with a malicious 's' parameter containing PHP expressions to execute arbitrary code on the server. Exploitation evidence was first observed by the Shadowserver Foundation on 2023-10-14.
References
- http://web.archive.org/web/20140201221754/http://www.jb51.net:80/softjc/43550.ht... technical-description exploit
- https://github.com/vulhub/vulhub/tree/master/thinkphp/2-rce technical-description exploit
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/vulnerabilit... technical-description
- https://www.vulncheck.com/advisories/thinkphp-2-x-3.0-lite-unauthenticated-rce-v... third-party-advisory
Internet-facing
3 days
Internal
60 days
- Not known to be exploited
- Can be exploited automatically
- Gives an attacker full control
Severity
9.3
Critical
Type
CWE-95Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')
Timeline
Published18 Nov 2026
Updated22 Nov 2026
First seen18 Nov 2026
Track software like this
Free during beta