Skip to content
Info disclosure Disclosed report Intermediate

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.

sectex Follow

Originally disclosed on HackerOne

  • 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):

  1. Go to Administration » Layout » Custom Scripts » Custom Script for Logged In Users
  2. Insert the following script window.open('file://c:/windows/system32/drivers/etc/hosts').eval('alert(document.body.innerText);');
  3. Click Save changes
  4. Open Rocket.Chat-Desktop and connect to the server
  5. A new window and an alert containing the contents of c:/windows/system32/drivers/etc/hosts will pop up.

Suggested mitigation

Impact

Arbitrary file read in Rocket.Chat-Desktop

The original report as published on HackerOne, by sectex. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

  1. Go to the custom scripts section for logged-in users in the server administration.
  2. Insert a script that opens a local file and displays its contents.
  3. Save the changes.
  4. Open Rocket.Chat Desktop and connect to the malicious server.
  5. 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.

More by sectex

View all

5 more disclosed reports, best first.

More from Rocket.Chat

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.