module

ThinkPHP Multiple PHP Injection RCEs

Disclosed
Dec 10, 2018
Created
Apr 13, 2020

Description

This module exploits one of two PHP injection vulnerabilities in the
ThinkPHP web framework to execute code as the web user.

Versions up to and including 5.0.23 are exploitable, though 5.0.23 is
vulnerable to a separate vulnerability. The module will automatically
attempt to detect the version of the software.

Tested against versions 5.0.20 and 5.0.23 as can be found on Vulhub.

Platform

Linux,Unix

Architectures

cmd, x86, x64

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':


msf > use exploit/unix/webapp/thinkphp_rce
msf exploit(thinkphp_rce) > show targets
...targets...
msf exploit(thinkphp_rce) > set TARGET < target-id >
msf exploit(thinkphp_rce) > show options
...show and set options...
msf exploit(thinkphp_rce) > exploit

Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.