CVE-2012-20007: ThinkPHP - Remote Code Execution
- Cve: CVE-2012-20007
- Name: ThinkPHP - Remote Code Execution
- Description: 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.
- Impact: Unauthenticated attackers can execute arbitrary PHP code remotely, leading to full server compromise.
- Remediation: Update to the latest version of ThinkPHP.
- Vulnerability impact: remote_code_execution
- Requirement type: none
- Labels source: securitycontext
- Severity: critical
- Cvss score: 9.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.00526
- Epss percentile: 0.45428
- Assignee: [email protected]
- Published at: 2026-11-18T16:17:47Z
- Age in days: 5
- Modified at: 2026-11-21T04:17:09Z
- References total: 5
- Products total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2012-20007
- Nvd status: received
- Checked, none or zero: patch available, nuclei templates, public exploits total, public exploits capped, public exploits, oss, projects total, projects, rejected by nvd
- Not known: vulnerability type, requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-95 | Improper Neutralization of Directives in Dynamically Evaluated Code |
Known exploited entries
| List | Added date | Due date | Ransomware use |
|---|---|---|---|
| vulncheck | 2026-11-18 | — | no |
References
| Url | Source | Tags |
|---|---|---|
| https://www.vulncheck.com/advisories/thinkphp-2-x-3.0-lite-unauthenticated-rce-via-dispatcher-path-info | vulncheck | Vulncheck Reported Exploitation |
| https://www.cve.org/CVERecord?id=CVE-2012-20007 | vulncheck | Vulncheck Reported Exploitation |
| http://web.archive.org/web/20140201221754/http://www.jb51.net:80/softjc/43550.html | nvd | |
| https://github.com/projectdiscovery/nuclei-templates/blob/main/http/vulnerabilities/thinkphp/thinkphp-2-rce.yaml | nvd | |
| https://github.com/vulhub/vulhub/tree/master/thinkphp/2-rce | nvd |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| thinkphp:thinkphp | = 3.0; >= 2.0, <= 2.2 | no | cna | /v1/products/thinkphp/thinkphp |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Known exploited by: vulncheck
- Vulncheck known exploited since: 2026-11-18
- Remote: yes
- Exposed hosts: 41716
- Checked, none or zero: known exploited, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports