Rapid7 Vulnerability & Exploit Database

WordPress W3 Total Cache PHP Code Execution

Back to Search

WordPress W3 Total Cache PHP Code Execution

Disclosed
04/17/2013
Created
05/30/2018

Description

This module exploits a PHP Code Injection vulnerability against WordPress plugin W3 Total Cache for versions up to and including 0.9.2.8. WP Super Cache 1.2 or older is also reported as vulnerable. The vulnerability is due to the handling of certain macros such as mfunc, which allows arbitrary PHP code injection. A valid post ID is needed in order to add the malicious comment. If the POSTID option isn't specified, then the module will automatically find or bruteforce one. Also, if anonymous comments aren't allowed, then a valid username and password must be provided. In addition, the "A comment is held for moderation" option on WordPress must be unchecked for successful exploitation. This module has been tested against WordPress 3.5 and W3 Total Cache 0.9.2.3 on a Ubuntu 10.04 system.

Author(s)

  • Unknown
  • juan vazquez <juan.vazquez@metasploit.com>
  • hdm <x@hdm.io>
  • Christian Mehlmauer <FireFart@gmail.com>

Platform

PHP

Architectures

php

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/wp_total_cache_exec
msf exploit(wp_total_cache_exec) > show targets
    ...targets...
msf exploit(wp_total_cache_exec) > set TARGET < target-id >
msf exploit(wp_total_cache_exec) > show options
    ...show and set options...
msf exploit(wp_total_cache_exec) > 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

;