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:

May 2024

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