Exploit-DB #43849
Description: Shopware 5.2.5/5.3 - Cross-Site Scripting
Type: webapps
Platform: json
Date: 2018-01-21
Author: Vulnerability-Lab

Exploit:
Document Title:
===============
Shopware 5.2.5 & v5.3 - Multiple Cross Site Scripting Web Vulnerabilities


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1922

Shopware Security Tracking ID: SW-19834

Security Update: 
http://community.shopware.com/Downloads_cat_448.html#5.3.4
http://community.shopware.com/_detail_2035.html

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-15374

CVE-ID:
=======
CVE-2017-15374


Release Date:
=============
2017-09-05


Vulnerability Laboratory ID (VL-ID):
====================================
1922


Common Vulnerability Scoring System:
====================================
4.4


Vulnerability Class:
====================
Cross Site Scripting - Persistent


Current Estimated Price:
========================
1.000€ - 2.000€


Product & Service Introduction:
===============================
Shopware is a modular online shop system that is since 2004 developed in germany. It is available both as 
an open source software as well as in commercial editions. The program can be extended in its functions by 
installing additional plugins. An open API allows third-party systems, such as payment services or ERP 
systems, to be connected. The system is multi shop capable it can thus be generated within an installation 
several shops in different domains. A multi-client capability (complete separation of multishops in the 
administration area) is by default, but can be achieved in the cluster.

(Copy of the Vendor Homepage: https://en.shopware.com/ )


Abstract Advisory Information:
==============================
The vulnerability laboratory core research team discovered multiple stored cross site scripting vulnerability in the official Shopware v5.2.5 & 5.3 CMS.


Vulnerability Disclosure Timeline:
==================================
2016-10-07: Researcher Notification & Coordination (Benjamin Kunz Mejri - Evolution Security GmbH)
2016-10-08: Vendor Notification (Shopware Security Team)
2016-**-**: Vendor Response/Feedback (Shopware Security Team)
2017-**-**: Vendor Fix/Patch (Shopware Service Developer Team)
2017-09-05: Public Disclosure (Vulnerability Laboratory)
2017-10-25: Security Acknowledgements (Shopware Developer Team)
2017-10-25: Security Acknowledgements (Shopware Security Team)


Discovery Status:
=================
Published


Affected Product(s):
====================
Shopware AG
Product: Shopware - Content Management System (Web-Application) 5.2.5

Shopware AG
Product: Shopware - Content Management System (Web-Application) 5.3


Exploitation Technique:
=======================
Remote


Severity Level:
===============
Medium


Technical Details & Description:
================================
The shopware v5.2.5 - v5.3 is vulnerable to cross site scripting in the customer and order section of the content management 
system backend modules. Remote attackers are able to inject malicious script code to the firstname, lastname or order 
input fields to provoke a persistent execution in the customer and orders section of the backend. The execution occurs 
in the shopware administrator backend listing when processing to preview the customers (kunden) or orders (bestellungen).
The injection can be processed by interaction via user registration or by manipulation of the order information inputs.
The web issue can be exploited by low privileged user accounts against higher privileged admin- oder moderator-accounts.

The security risk of the bugs are estimated as medium with a cvss (common vulnerability scoring system) count of 4.4. 
Exploitation of the issue requires a low privileged web-application user account and low or medium 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):
[+] POST (Registration)
[+] POST (Order Item)
[+] POST (Profile Update)

Vulnerable Input(s):
[+] Firstname
[+] Lastname
[+] Order Name

Affected Module(s):
[+] Kunden (Customers)
[+] Bestellungen (Orders)


Proof of Concept (PoC):
=======================
The cross site vulnerabilities can be exploited by remote attackers with low privileged shopware 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.  Open the the browser and surf to the target shopware v5.2.5 web-application
2.  Move to the registration formular
3.  Include a script code payload with a iframe src onload tag to the firstname, lastname and name parameters
4.  Submit the request via POST method to register the account
5.  Move to the inbox and verify via link the account to activate
Note: Now the payloads are executable saved to the Kunden (Customer) section in the backend
6.  The administrator visits in the next step the Kunden (Customer) section to preview
7.  The script code payload executes in the customers list
8.  As next step the attacker places an order via shop
Note: The order name manipulation via registration is as well able to execute script code the context
9.  The administrator visits in the next step the Bestellungen (orders) section to preview 
10. The script code payload executes in the orders list
11. Successful reproduce of the both cross site vulnerabilities!

Note: Attackers are able to inject malicious redirects, frames with payloads or other script code tags.
The basic web validation filter of the shopware content management system does not encode the list context.


PoC: Vulnerable Source (Execution in Orders - Bestellungen)
<tr class="x-grid-row  x-grid-row-alt"><td class=" x-grid-cell x-grid-cell-gridcolumn-1496  
x-grid-cell