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:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 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