Arbitrary file read in Rocket.Chat-Desktop
A malicious Rocket.Chat server could inject custom scripts that open a local file URL and read its contents, allowing an attacker to read arbitrary files on the victim's machine.
- Triaged in 16 hours
- Fixed in 17 months
- Disclosed after 18 months
Description: Rocket.Chat-Desktop is vulnerable to arbitrary file read.
Releases Affected:
- Rocket.Chat-Desktop-Client: < v3.0.0-develop
Steps To Reproduce (by setting up a malicious server):
- Go to
Administration » Layout » Custom Scripts » Custom Script for Logged In Users - Insert the following script
window.open('file://c:/windows/system32/drivers/etc/hosts').eval('alert(document.body.innerText);'); - Click
Save changes - Open Rocket.Chat-Desktop and connect to the server
- A new window and an alert containing the contents of
c:/windows/system32/drivers/etc/hostswill pop up.
Suggested mitigation
- Set
popupstofalse[src » component » electron » WebViewComponent.js (line 16)].
Impact
Arbitrary file read in Rocket.Chat-Desktop
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the desktop client allows custom scripts from the server to open local file URLs and access their contents without restriction.
What the attacker needed
Victim connects to a malicious server; attacker controls the server
The fix
The suggested mitigation is to disable popups in the WebView component.
How it was found
- Go to the custom scripts section for logged-in users in the server administration.
- Insert a script that opens a local file and displays its contents.
- Save the changes.
- Open Rocket.Chat Desktop and connect to the malicious server.
- A new window and an alert showing the file contents appear.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Rocket.Chat Desktop is an app that connects to chat servers. If you connect to a bad server, it can run code that opens a local file on your computer and shows its contents, so the server owner can read files on your machine.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.