GhostMail Filename To Link Script Insertion

2018-07-18T00:00:00
ID PACKETSTORM:148603
Type packetstorm
Reporter vulnerability-lab.com
Modified 2018-07-18T00:00:00

Description

                                        
                                            `Document Title:  
===============  
GhostMail - (filename to link) POST Inject Web Vulnerability  
  
  
References (Source):  
====================  
http://www.vulnerability-lab.com/get_content.php?id=1471  
  
  
Release Date:  
=============  
2018-06-26  
  
  
Vulnerability Laboratory ID (VL-ID):  
====================================  
1471  
  
  
Common Vulnerability Scoring System:  
====================================  
4.2  
  
  
Vulnerability Class:  
====================  
Cross Site Scripting - Persistent  
  
  
Current Estimated Price:  
========================  
500a! - 1.000a!  
  
  
Product & Service Introduction:  
===============================  
Sign up to military grade encrypted GhostMail and enjoy instant free and  
secure email & chat. No download or installs needed.  
GhostMail is your new secure email & chat platform, with great features  
like self destruction, two factor login and much more...  
Join free today and start enforcing your privacy and online rights.  
  
(Copy of the Vendor Homepage: https://www.ghostmail.com/ )  
  
  
Abstract Advisory Information:  
==============================  
The vulnerability laboratory core research team discovered an  
application-side vulnerability in the official GhostMail chat online  
service web-application.  
  
  
Vulnerability Disclosure Timeline:  
==================================  
2018-06-26: Public Disclosure (Vulnerability Laboratory)  
  
  
Discovery Status:  
=================  
Published  
  
  
Affected Product(s):  
====================  
GhostCom Ltd.  
Product: GhostMail (Chat) - Web Application (Online Service) 2015 Q2  
  
  
Exploitation Technique:  
=======================  
Remote  
  
  
Severity Level:  
===============  
Medium  
  
  
Authentication Type:  
====================  
Restricted authentication (user/moderator) - User privileges  
  
  
User Interaction:  
=================  
Low User Interaction  
  
  
Disclosure Type:  
================  
Bug Bounty Program  
  
  
Technical Details & Description:  
================================  
An application-side input validation web vulnerability has been  
discovered in the official Ghostmail online service web-application.  
The vulnerability allows remote attackers to inject own script codes on  
the application-side of the affected web-application module.  
  
The vulnerability is located in the `file attach link` and `filename`  
value of the `ghostmail - mail` module. The filename and  
file attach link input values are wrong encoded. The vulnerability  
allows remote attackers to inject own script code to the  
application-side of the vulnerable module. The request method to inject  
the script code is POST and the attack vector is persistent.  
  
The security risk of the persistent web vulnerability is estimated as  
medium with a cvss (common vulnerability scoring system) count of 3.7.  
Exploitation of the persistent input validation vulnerability requires a  
low privileged web-application user account and low user interaction.  
Successful exploitation results in session hijacking, persistent  
phishing attacks, persistent external redirect and malware loads or  
persistent  
manipulation of affected and connected module context.  
  
Request Method(s):  
[+] POST  
  
Vulnerable Module(s):  
[+] Ghostmail/mail  
  
Vulnerable Input(s):  
[+] File attach link  
  
Vulnerable Parameter(s):  
[+] filename  
  
  
Proof of Concept (PoC):  
=======================  
The application-side 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.  
  
  
PoC: Payload (Exploitation)  
<a  
href="blob:https://www.ghostmail.com/13cfcc29-03fb-4d94-9ad8-c372ddaa02fd"  
download="" filename="../"[MALICIOUS SCRIPT CODE PAYLOAD!]">"></a>  
  
  
Manual steps to reproduce the security vulnerability ...  
1. Opne the ghostmail online service page and login  
2. Move to the ./mail path of the application  
3. Start a session tamper for http protocols to intercept  
4. Inject your own script code in the name of attach file parameter  
during the request  
Note: There's a script code injection vulnerability in the link for the  
file attach (attachment) parameter  
Note: In the link to download the file and in the download="name file"  
use "title="THIS IS A VULN_LAB TEST"  
5. When you will upload a file with name "filename="  
6. The link in the attachment changes and cannot download the file  
because the link has no name specification for downloading  
Note: <a  
href="blob:https://www.ghostmail.com/13cfcc29-03fb-4d94-9ad8-c372ddaa02fd"  
download="" filename="[MALICIOUS SCRIPT CODE PAYLOAD!]>"></a>  
7. Successful reproduce of the vulnerability!  
  
  
Reference(s):  
https://www.ghostmail.com/  
https://www.ghostmail.com/13cfcc29-03fb-4d94-9ad8-c372ddaa02fd  
  
  
Solution - Fix & Patch:  
=======================  
The vulnerability can be patched by a parse and encode of the vulnerable  
filename and link to filename value in the upload POST method request.  
Restrict the input and disallow special chars. Escape the web context to  
prevent an application-side script code execution vulnerability.  
  
The vulnerability has been reported 2016-10-01. The issue was resolved  
during the 2017 Q2 - Q4 by the ghost mail developer team.  
  
  
Security Risk:  
==============  
The security risk of the application-side input validation web  
vulnerability in the ghostmail mail module is estimated as medium (CVSS  
4.2).  
  
  
Credits & Authors:  
==================  
Vulnerability-Lab [research@vulnerability-lab.com] -  
https://www.vulnerability-lab.com/show.php?user=Vulnerability-Lab  
  
  
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 A(c) 2018 | Vulnerability Laboratory - [Evolution  
Security GmbH]aC/  
  
  
  
  
--   
VULNERABILITY LABORATORY - RESEARCH TEAM  
SERVICE: www.vulnerability-lab.com  
`