HackerFeeds
All CVEs

CVE-2012-20007: ThinkPHP Eval Injection

CRITICAL9.8

Published 2026-11-18 · Updated 2026-11-21 · Source disclosure@vulncheck.com

Remotely exploitable without authentication — apply the vendor fix or mitigation as a priority.

What to do

  1. The advisory lists versions through 2.2 as affected and does not name a fixed release. Check the references below for a newer version of ThinkPHP or a vendor mitigation.
  2. Until it is patched, do not leave ThinkPHP reachable from the internet or other untrusted networks; restrict access by firewall, VPN or allow-list.
  3. Restrict access to the affected feature to trusted users until the fix is applied.

Affected and fixed versions

ProductAffectedFixed in
ThinkPHP≤ 2.2Not stated in the advisory

Derived by HackerFeeds from the advisory text, CVSS vector and weakness class. Confirm versions against the vendor advisory before acting.

How it can be exploited

It can be exploited remotely over the network; the attacker does not need an account, and no action by a victim is required. Attack complexity is low, so a working exploit is expected to be reliable. The impact on confidentiality, integrity and availability is rated high.

CVSS 3.1 metrics for CVE-2012-20007
Attack vectorNetworkIt can be exploited remotely over the network.
Attack complexityLowNo special conditions are needed; the attack is repeatable.
Privileges requiredNoneThe attacker does not need an account.
User interactionNoneNo action by a victim is needed.
ConfidentialityHighTotal loss of confidentiality.
IntegrityHighTotal loss of integrity.
AvailabilityHighTotal loss of availability.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weakness: Eval Injection

Attacker-controlled input is passed to a code evaluation function, which usually means arbitrary code execution.

Classified as CWE-95.

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.

Advisory text as published in the NVD record.

View on NVD