Exploit Title: Chatbox is affected by cross-site scripting (XSS). An attacker has to upload any XSS payload with SVG, XML file in Chatbox.
#There is no restriction on file upload in Chatbox which leads to stored XSS
Exploit Author: Ritesh Gohil
Tested on: Kali Linux and Windows 10
Attack Vector: This vulnerability can results attacker to inject the XSS payload into the IMAGE URL and each time any user will go to that URL, the XSS triggers, and the attacker can able to steal the cookie according to the crafted payload.
Steps to Reproduce:
- Take Chatbox Demo from https://getgist.com/
- In the Chatbox. open it and start conversation.
- After observing chatbox, I have found that there is no restriction on upload files. I can able to upload xss payload with SVG, XML ... many more.
- For example, I have uploaded xss payload with SVG file. (Note Inside the payload you can use: alert(document.location) , alert(1), alert(document.domain) >> I have used in POC)
- Boom Click on Image XSS has been triggered.
Payload: XSS Payload with SVG or XML File.
The impact of an exploited XSS vulnerability on a web application varies a lot. It ranges from user's Session Hijacking, and if used in conjunction with a social engineering attack it can also lead to disclosure of sensitive data, CSRF attacks and other security vulnerabilities.
If an attacker can control a script that is executed in the victim's browser, then they can typically fully compromise that user. Amongst other things, the attacker can:
Perform any action within the application that the user can perform. View any information that the user is able to view. Modify any information that the user is able to modify. Initiate interactions with other application users, including malicious attacks, that will appear to originate from the initial victim user.
Content Security Policy : As a last line of defense, you can use Content Security Policy (CSP) to reduce the severity of any XSS vulnerabilities that still occur.