Skip to content
DayZeroHub
Critical CVSS 9.3CVE-2012-20007

CVE-2012-20007: Unauthenticated Remote Code Execution in ThinkPHP 2.x and 3.0 Lite

TopThink ThinkPHP

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.

ProductVersionsFixed in
TopThink ThinkPHP>= 2.0, <= 2.2—
TopThink ThinkPHP3.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.

Information taken from the source or the vendor. Verify it at the original link before acting.

Sources and references

Weaknesses (CWE): CWE-95

Relevant change history

  1. Published

    Advisory published.

Summary written with AI assistance from the source data. See the sources and references for complete information. View sources