Rapid7 Vulnerability & Exploit Database

ThinkPHP Multiple PHP Injection RCEs

Back to Search

ThinkPHP Multiple PHP Injection RCEs

Disclosed
12/10/2018
Created
04/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.

Author(s)

  • wvu <wvu@metasploit.com>

Platform

Linux,Unix

Architectures

cmd, x86, x64

Development

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

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;