Document Title:
===============
Magento MarketPlace T1 - Bypass & Persistent Vulnerability
References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1902
Release Date:
=============
2018-06-17
Vulnerability Laboratory ID (VL-ID):
====================================
1902
Common Vulnerability Scoring System:
====================================
4.2
Vulnerability Class:
====================
Cross Site Scripting - Persistent
Current Estimated Price:
========================
500€ - 1.000€
Product & Service Introduction:
===============================
Magento is an open-source e-commerce platform written in PHP. The software was originally developed by Varien Inc., a US private company headquartered
in Culver City, California, with assistance from volunteers. Varien published the first general-availability release of the software on March 31, 2008.
Roy Rubin, former CEO of Varien, later sold a substantial share of the company to eBay, which eventually completely acquired and then spun off the company.
(Copy of the Homepage: https://en.wikipedia.org/wiki/Magento )
Abstract Advisory Information:
==============================
The vulnerability laboratory core research team discovered a filter bypass and input validation vulnerability in the official Magento MarketPlace web-application.
Vulnerability Disclosure Timeline:
==================================
2018-06-18: Public Disclosure (Vulnerability Laboratory)
Discovery Status:
=================
Published
Affected Product(s):
====================
Magento
Product: MarketPlace - Online Service (Web-Application) 2016 Q3
Exploitation Technique:
=======================
Remote
Severity Level:
===============
Medium
Authentication Type:
====================
Open Authentication (Anonymous Privileges)
User Interaction:
=================
Low User Interaction
Disclosure Type:
================
Responsible Disclosure
Technical Details & Description:
================================
An application-side input validation and mail encode vulnerability has been discovered in the magento marketplace online service web-application.
The persistent vulnerability allows remote attackers to inject own malicious script codes to the application-side of the affected module.
The vulnerability is located in the firstname parameter of the magento marketplace outgoing service mail context. Remote attackers are able
to inject a malicious payload as firstname to the web-application. Thus can be handled during the sync registration of the portal because of
the same origin policy. After the registration the attacker can change the email to spoof the input context of the firstname that is read by
the outgoing generated mail service in html. The firstname input is influenced by the attacker to manipulate the email body context of the
original [email protected] email address.
The site validation itself disallows to register with thus type of payload in the firstname. The attacker can bypass this by a manipulated
main account that is used to sync with the marketplace notification of moderator/administrator interaction. The method takes a bit time,
but is more successful on exploitation because of the target can not be identified as the evil sender (attacker). Reason is that he sends
the email through the mail [email protected] service of the web-application as original email address. Remember that the email which is
saved via profile is used for the mailings. Thus results as well in the problemtic that leads to email message body context spoofing.
The issues does only affect the new magento marketplace web-application. Different issues reported with the same type was already fixed
as valid bug bounty in the imagine, main site, shop and enterprise web-applications of magento.
The attack vector of the vulnerability is located on the application-side of the online service and the request method to inject is POST.
The security risk of the application-side vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.5.
Exploitation of the persistent vulnerability requires a low privileged magento user account with restricted access and with low user interaction.
Successful exploitation of the vulnerabilities results in persistent phishing mails, session hijacking, persistent external redirect to malicious
sources and application-side manipulation of affected or connected module context.
Request Method(s): (Inject)
[+] POST
Vulnerable Module(s):
[+] MarketPlace Magento
Affcted Module(s):
[+] Mail Notify - (New Top Extensions on Magento Marketplace)
Internal Sender(s):
[+] [email protected]
External Email(s): (Account)
[+] [email protected]
Proof of Concept (PoC):
=======================
The persistent vulnerability can be exploited by remote attackers with low privilege magento user account and low user interaction.
For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.
Manual steps to reproduce the vulnerability ...
1. Register a magento account with test payload in the firstname
2. Subscribe to the events that delivers new events via email notify
3. Check the email inbox
4. The payload executes in the email body next to the Dear name introduction
5. Successful reproduce of the application-side vulnerability!
Note: Random mails can be compromised by sending malicious code of the original magento marketplace post inbox.
--- Mail Header Information Log ---
Betreff: New Top Extensions on Magento Marketplace
Von: Magento <[email protected]>
Datum: 08.08.2016 17:28
An: [email protected]
PoC: Exploitation (Mail Body: New Top Extensions on Magento Marketplace)
<tbody><tr>
<td height="25"> </td></tr>
<tr><td class="mktEditable" id="Title 1" style="text-align:left; font-family:Georgia, Arial,
Helvetica, sans-serif; font-size:34px; color:#31302b; " valign="top"><p style="margin: 0px;
padding-left: 30px;"><span style="font-size: 30px;">New Top Extensions on Marketplace</span></p></td></tr>
<tr>
<td height="25"> </td></tr>
<tr><td><table class="deviceWidth" style="font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#32302b;
"border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="mktEditable" id="Body 1"
style="text-align:left; font-family:Arial, Helvetica, sans-serif; font-size:14px; line-height:22px; color:#676056; " valign="top"><div>
<p><span style="color: #000000;">
Dear ">[PERSISTENT SCRIPT CODE EXECUTION!]<iframe src="./evil/source">%20>"<iframe src=a onload=alert(document.cookie)<</span>
<br /></p>
<p><span style="color: #000000;">Thank you for your continued support as we work to deliver a great Merchant experience on</span>
<strong><span style="color: #ff6600;"><a style="color: #ff6600;" href=
"http://email2.magento.com/U09U00D0XG0GsO022q000DW"
>Magento Marketplace</a>!</span></strong> <span style="font-size: 11.0pt; font-family: Arial; color: #544e44;">Below we have
highlighted some of the popular Magento <span style="background-image: none; background-repeat: repeat; background-attachment:
scroll; background-position: 0% 0%; background-clip: border-box; background-origin: padding-box; background-size: auto auto;">
2</span> extensions on the Marketplace</span></p>
<div><strong><span style="color: #ff6600;"><a style="color: #ff6600;" href=
"http://email2.magento.com/F2WGX00Ea0G0U2O0000Dsq0"
>Fooman: Order Manager</a></span></strong></div>
<div><span style="color: #252420;">Manage orders in bulk with one click - save hours of time each week. </span></div>
<div><span style="color: #252420;"></span><br /></div>
<div><span style="color: #ff6600;"><strong><a style="color: #ff6600;" href=
"http://email2.magento.com/o02Fq00bO002UG00WDGs0X0"
>TaxJar: Sales Tax Automation</a></strong></span></div>
Note: The vulnerable registration formular to trigger an exploitation is located in the index site of the magento marketplace online service.
Solution - Fix & Patch:
=======================
The vulnerability can be patched by a parse and encode of the vulnerable firstname parameter in the outgoing email
message body context. Disallow the usage of special chars and filter the context to prevent further injection attacks.
Escape the entries in case of emergency to ensure that the context is securely replied by the mail in outgoing mails.
The vulnerability has been patched in 2017 Q2 - Q4 by the magento developer team.
Security Risk:
==============
The security risk of the application-side input validation and mail encode web vulnerability is estimated as medium (CVSS 3.5).
Credits & Authors:
==================
Vulnerability Laboratory [Core Research Team] - ([email protected]) [www.vulnerability-lab.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 Labs or its
suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability mainly for incidental
or consequential damages so the foregoing limitation may not apply. We do not approve or encourage anybody to break any licenses, policies, deface
websites, hack into databases or trade with stolen data. We have no need for criminal activities or membership requests. We do not publish advisories
or vulnerabilities of religious-, militant- and racist- hacker/analyst/researcher groups or individuals. We do not publish trade researcher mails,
phone numbers, conversations or anything else to journalists, investigative authorities or private individuals.
Domains: www.vulnerability-lab.com - www.vulnerability-db.com - www.evolution-sec.com
Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register.php
Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php
Social: twitter.com/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab
Any modified copy or reproduction, including partially usages, of this file, resources or information 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, modify, use or edit our material contact (admin@) to get an ask permission.
Copyright © 2018 | Vulnerability Laboratory - [Evolution Security GmbH]™
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation