Ecwid Ecommerce Shopping Cart WordPress Plugin unauthenticated PHP Object injection vulnerability

Abstract

A PHP Object injection vulnerability was found in the Ecwid Ecommerce Shopping Cart 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.

OVE ID

OVE-20160803-0002

Tested versions

This issue was successfully tested on the Ecwid Ecommerce Shopping Cart WordPress Plugin version 4.4/4.4.3.

Fix

This issue has been addressed in Ecwid Ecommerce Shopping Cart version 4.4.4.

Introduction

The Ecwid Ecommerce Shopping Cart WordPress Plugin is an easy-to-use online store solution that gives you a full-functioned shop on your WordPress website. A PHP Object injection vulnerability was found in the Ecwid Ecommerce Shopping Cart 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 _load_state() method. The input is taken directly from the ecwid_oauth_state cookie as can be seen in the following code fragment:

includes/class-ecwid-oauth.php:

protected function _load_state() {
	if (isset($_COOKIE['ecwid_oauth_state'])) {
		$this->state = **@unserialize( $_COOKIE['ecwid_oauth_state'] )**;
	
}

It has been confirmed that this issues can be used to execute arbitrary PHP code.

Vragen of feedback?