RocketChat - Unauthenticated access to messages
RocketChat's LiveChat API endpoints could be called without authentication, allowing an attacker to register a guest user and then read messages in public and private channels. By obtaining user IDs from the GENERAL channel, an attacker could brute-force private message channel IDs to access private conversations.
Published on securifyinc.com
Written by Rojan Rijal
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the livechat:registerGuest and livechat:loadHistory methods were exposed via method.callAnon without additional authentication checks, allowing unauthenticated users to register guests and load message history.
Impact
An unauthenticated attacker could read messages in public and private channels, including private messages between users.
What the attacker needed
RocketChat instance with LiveChat enabled; Network access to the instance
How it was found
- Send a request to the livechat:registerGuest method via method.callAnon with a token, name, and email to create a guest user.
- Use the obtained token to call the livechat:loadHistory method via method.callAnon with the channel ID GENERAL to read messages in the GENERAL channel.
- Extract user IDs from the messages in the GENERAL channel.
- Use Burp Intruder's ClusterBomb to iterate through combinations of user IDs to form private message channel IDs and access private messages.
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 write-up has not been written yet. The Original tab links to the source.
RocketChat is a chat app. Some of its API endpoints meant for guest users did not check if the caller was logged in. An attacker could use those endpoints to create a guest account and then read messages in channels, including private ones.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.