Headline
CVE-2016-15004: Summer of Pwnage! July 1-29, Amsterdam.
A vulnerability was found in InfiniteWP Client Plugin 1.5.1.3/1.6.0. It has been declared as critical. Affected by this vulnerability is an unknown functionality. The manipulation leads to injection. The attack can be launched remotely. Upgrading to version 1.6.1.1 is able to address this issue. It is recommended to upgrade the affected component.
Yorick Koster, June 2016
InfiniteWP Client WordPress Plugin unauthenticated PHP Object injection vulnerability****Abstract
A PHP Object injection vulnerability was found in the InfiniteWP Client WordPress Plugin, which can be used by an unauthenticated user to instantiate arbitrary PHP Objects. Using this vulnerability it is possible to execute arbitrary PHP code.
Contact
For feedback or questions about this advisory mail us at sumofpwn at securify.nl
The Summer of Pwnage
This issue has been found during the Summer of Pwnage hacker event, running from July 1-29. A community summer event in which a large group of security bughunters (worldwide) collaborate in a month of security research on Open Source Software (WordPress this time). For fun. The event is hosted by Securify in Amsterdam.
OVE ID
OVE-20160803-0004
Tested versions
This issue was successfully tested on the InfiniteWP Client WordPress Plugin version 1.5.1.3/1.6.0.
Fix
Input validation was added to version 1.6.1.1 of InfiniteWP Client to mitigate this issue. JSON support was added to InfiniteWP Client version 1.6.3.2, which will eventually replace the serialized data.
Introduction
The InfiniteWP Client WordPress Plugin allows users to manage unlimited number of WordPress sites from their own server. A PHP Object injection vulnerability was found in the InfiniteWP Client WordPress Plugin, which can be used by an unauthenticated user to instantiate arbitrary PHP Objects.
Details
This issue is possible due to an unsafe call to unserialize() in the iwp_mmb_parse_request() method. The input is taken directly from the POST body as can be seen in the following code fragment:
init.php:
if( !function_exists (‘iwp_mmb_parse_request’)) {
function iwp_mmb_parse_request()
{
global $HTTP_RAW_POST_DATA;
$HTTP_RAW_POST_DATA_LOCAL = NULL;
$HTTP_RAW_POST_DATA_LOCAL = file_get_contents(‘php://input’);
if(empty($HTTP_RAW_POST_DATA_LOCAL)){
if (isset($HTTP_RAW_POST_DATA)) {
$HTTP_RAW_POST_DATA_LOCAL = $HTTP_RAW_POST_DATA;
}
}
ob\_start();
global $current\_user, $iwp\_mmb\_core, $new\_actions, $wp\_db\_version, $wpmu\_version, $\_wp\_using\_ext\_object\_cache;
**$data = base64\_decode($HTTP\_RAW\_POST\_DATA\_LOCAL);**
if ($data){
//$num = @extract(unserialize($data));
**$unserialized\_data = @unserialize($data);**
if(isset($unserialized\_data\['params'\])){
$unserialized\_data\['params'\] = iwp\_mmb\_filter\_params($unserialized\_data\['params'\]);
}
It has been confirmed that this issues can be used to execute arbitrary PHP code.