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
VendorProductAffected 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.
Fix within
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
Exploitation
<1% chance of attack within 30 days
Type
CWE-95Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')
Timeline
Published18 Nov 2026
Updated22 Nov 2026
First seen18 Nov 2026
Sources
CVE-2012-20007 · MITRE
Track software like this
Free during beta