Mpay24 PrestaShop Payment Module Multiple Vulnerabilities
- Affected Vendor: Mpay24
- Affected Software: Mpay24 Payment Module
- Affected Version: 1.5 and earlier
- Issue Type: SQL injection and information disclosure
- Notification Date: 10 February 2014
- Release Date: 03 September 2014
- Discovered by: Eldar Marcussen
- Issue status: Patch available
BAE Systems Applied Intelligence researcher, Eldar Marcussen has identified
two high impact vulnerabilities in the Mpay24 payment module for the
Prestashop e-commerce solution.
Mpay24 is the online-payment platform for e- and m-commerce combines
frequently used and innovative payment systems in one single interface”. [
“Prestashop is the free ecommerce solution to start your online business
and start selling online. Build an online store for free with Prestashop.” [
Pre-Authentication Blind SQL Injection Requires
Mpay24 payment module present on the website.
The Mpay24 plugin version 1.5 and earlier does not sufficiently filter or
escape user supplied data used in database queries resulting in SQL
The following blind SQL injection vulnerability is caused by user supplied
data being used directly in a database query, as evidenced by the offending
confirm.php:13: UPDATE `"._DB_PREFIX_."mpay24_order` SET
confirm.php:14: `MPAYTID` = ".$_REQUEST['MPAYTID'].",
confirm.php:15: `STATUS` = '".$_REQUEST['STATUS']."'
confirm.php:16: WHERE `TID` = '".$_REQUEST['TID']."'
Using this vulnerability, BAE Systems was able to extract information
directly from the database, bypassing any restrictions that may be enforced
by the application.
Proof of Concept
The following URL introduces an artificial delay in the page response time
which can be used by an attacker to extract data from the database:
Use prepared statements to ensure the structure of the database query
Pre-Authentication Information Disclosure Requires
Mpay24 configured with debug enabled (default value until version 1.6).
The Mpay24 plugin logs raw curl requests and other debugging information to
the payment gateway by default. This log file is publicly accessible and
contains information valuable to an attacker, including the base64 encoded
credentials used by the merchant to access the Mpay24 API.
Using this vulnerability, BAE Systems was able to obtain Mpay24 API
credentials and the local path of the Prestashop installation. The attacker
can use the API credentials to hijack the merchants API access and leverage
the local path disclosure with other exploits.
Proof of Concept
* About to connect() to test.mpay24.com port 443 (#0)
* Trying 22.214.171.124...
* Connected to test.mpay24.com (126.96.36.199) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: /var/www/prestashop/modules/mpay24/api/cacert.pem
* SSL connection using DHE-RSA-AES256-GCM-SHA384
* Server certificate:
* subject: OU=Domain Control Validated; OU=Provided by EUNETIC GmbH;
OU=EuropeanSSL Single; CN=test.mpay24.com
* start date: 2013-05-13 00:00:00 GMT
* expire date: 2015-05-13 23:59:59 GMT
* subjectAltName: test.mpay24.com matched
* issuer: C=DE; O=EUNETIC GmbH; CN=EuropeanSSL Server CA
* SSL certificate verify ok.
* Server auth using Basic with user 'u91234'
> POST /app/bin/etpproxy_v15 HTTP/1.1
Authorization: Basic dTkxMjM0OlNPQVAxMjM=
User-Agent: mPAY24 PHP API $Rev: 5522 $ ($Date:: 2013-06-24 #$)
* upload completely sent off: 423 out of 423 bytes
* additional stuff not fine transfer.c:1037: 0 0
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 401 Authorization Required
< Date: Sun, 09 Feb 2014 21:04:21 GMT
< Server: Apache
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="mPAY24 WebService"
< Content-Length: 401
< Content-Type: text/html; charset=iso-8859-1
* Connection #0 to host test.mpay24.com left intact
* Closing connection #0
Restrict access to webpages containing sensitive functionality or data to
End User Recommendation
Update your Mpay24 plugin to version 1.6 or later.
- 10/02/2014 – Vendor notified
- 13/02/2014 – Patch available through GitHub
- 19/02/2014 – CVE identifiers assigned
03/09/2014 Advisory released