Improper ACL in Message Starring
The message starring feature checked room access using a room ID supplied by the user, but did not verify that the target message belonged to that room. An attacker could star or unstar any message by providing a room they had access to.
- Triaged in 24 hours
- Fixed in 7 months
- Disclosed after 3.6 years
Summary: Improper access checks when starring messages allow write operations of the starred attribute of arbitrary messages.
Description: Room access validation is performed on user provided data. In absence of a check whether a Message is in a certain room, attackers can provide an unrelated Room ID where they have access to (e.g. general) to then star an arbitrary message.
Releases Affected:
- develop Branch (
19685c04c32e8c9ae95371acd2301769f0b734a9)
Steps To Reproduce (from initial installation to vulnerability):
(Add details for how we can reproduce the issue)
- Login to Rocket.Chat
- Open Web Inspector
- Call
starMessageMeteor method:
Meteor.call("starMessage", {
rid: "<ANY_ROOM_ID_WITH_ACCESS>",
_id: "<TARGET_MESSAGE_ID>",
starred: true
}, (...args) => console.log(...args));
Suggested mitigation
- Validate match of the Message rid before writing changes
Impact
Attackers can manipulate manipulate the starred attribute of arbitrary messages.
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
The server validated access to a user-supplied room ID but did not verify that the target message's room matched that ID before updating the message.
Impact
Attackers could manipulate the starred attribute of arbitrary messages.
What the attacker needed
A Rocket.Chat account; access to at least one room; knowledge of a target message ID
The fix
The message's room ID should be validated against the supplied room before writing changes.
How it was found
- Log in to Rocket.Chat.
- Open the browser's web inspector.
- Call the starMessage Meteor method with a room ID you have access to, the target message ID, and starred set to true.
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.
When you star a message, the server checks that you are allowed in the room you name. But it never checked that the message you are starring is actually in that room. So you could name a room you belong to and then star a message from a completely different room you should not touch.
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.