Eval injection in ThinkPHP Lite mode allows remote code execution
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- No fix listed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-95.
Summary
TopThink ThinkPHP 2.0 through 2.2 and 3.0 Lite mode contains an eval injection flaw (CWE-95) in Dispatcher PATH_INFO parsing, where preg_replace runs with the /e modifier on user input. An unauthenticated remote attacker can send a crafted request to index.php with a malicious 's' parameter containing PHP expressions to execute arbitrary code on the server. The Shadowserver Foundation first observed exploitation on 2023-10-14, and a public exploit is linked in the references.
Written with Claude Haiku 5.5 from the sources below · 2026-11-21
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
The sources list no fixed version for ThinkPHP.
Written with Claude Haiku 5.5 from the sources below · 2026-11-21
Timeline
- 2026-11-18 Threatist record created from CVE-2012-20007
- 2026-11-18 Alias added: GHSA-cg43-958h-m32g
- 2026-11-21 CISA SSVC decision points changed
References
Other 1
More TopThink vulnerabilities
- TI-2019-16197 Code injection in TopThink ThinkPHP allows unauthenticated command execution CVSS 4.0CRITICAL 9.3
Sources
- CVE-2012-20007 · CVE Program
- CVE-2012-20007 · NVD
- FIRST EPSS
- GHSA-cg43-958h-m32g · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences