exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

OpenCart 1.5.6.4 PHP Object Injection

OpenCart 1.5.6.4 PHP Object Injection
Posted Jul 14, 2014
Authored by EgiX

OpenCart versions 1.5.6.4 and below suffer from a PHP objection injection vulnerability.

tags | exploit, php
advisories | CVE-2014-3990
SHA-256 | 663873769c470a4e3c4873762728fbfdc6d21b8ca404b7e2e387b6e5ecd39c4e

OpenCart 1.5.6.4 PHP Object Injection

Change Mirror Download
-----------------------------------------------------------------
OpenCart <= 1.5.6.4 (cart.php) PHP Object Injection Vulnerability
-----------------------------------------------------------------


[-] Software Link:

http://www.opencart.com/


[-] Affected Versions:

Version 1.5.6.4 and prior versions.


[-] Vulnerability Description:

The vulnerable code is located in the "Cart::getProducts()" method defined in /system/library/cart.php:

23. foreach ($this->session->data['cart'] as $key => $quantity) {
24. $product = explode(':', $key);
25. $product_id = $product[0];
26. $stock = true;
27.
28. // Options
29. if (!empty($product[1])) {
30. $options = unserialize(base64_decode($product[1]));
31. } else {
32. $options = array();
33. }

The vulnerability exists because this method uses the "unserialize()" function with the key values of the
array stored into the "data['cart']" session variable without a proper validation. Such values might be
manipulated by an unauthenticated attacker via the $_POST['quantity'] parameter during an "update" request.
This can be exploited to inject arbitrary PHP objects into the application scope, and could allow an attacker
to conduct Server-Side Request Forgery (SSRF) attacks by abusing the destructor method of the "DBMySQLi"
class and possibly other attacks leveraging magic methods of classes defined in third-party extensions.

NOTE: if OpenCart is running on PHP before version 5.3.23 or 5.4.13 this vulnerability
could also be exploited to carry out XML External Entity (XXE) attacks, which in turn
might allow arbitrary command execution if the PHP "expect" extension is installed.


[-] Solution:

Update to version 1.5.6.5 when will be released or apply this patch: http://git.io/F3dGoA


[-] Disclosure Timeline:

[02/06/2014] - First attempt to contact the vendor
[04/06/2014] - Issue reported to http://git.io/uOsKfA
[06/06/2014] - CVE number requested
[06/06/2014] - CVE number assigned
[25/06/2014] - Vendor contacted again asking when will be released a fixed version
[25/06/2014] - Vendor replied there's no need to alert its users because the vulnerability is very weak
[14/07/2014] - Public disclosure


[-] CVE Reference:

The Common Vulnerabilities and Exposures project (cve.mitre.org)
has assigned the name CVE-2014-3990 to this vulnerability.


[-] Credits:

Vulnerability discovered by Egidio Romano.


[-] Original Advisory:

http://karmainsecurity.com/KIS-2014-08
Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    43 Files
  • 8
    Aug 8th
    42 Files
  • 9
    Aug 9th
    36 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    27 Files
  • 13
    Aug 13th
    18 Files
  • 14
    Aug 14th
    50 Files
  • 15
    Aug 15th
    33 Files
  • 16
    Aug 16th
    0 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close