getRoomRoles Method leaks Channel Owner
The getRoomRoles Meteor method did not check whether the caller was a member of the channel before returning its role assignments. An unauthenticated or low-privileged client could query any room ID and learn which users held special roles in private channels.
- Triaged in 3 days
- Fixed in 6 months
- Disclosed after 8 months
Summary by the program
Summary
Lack of ACL checks in the getRoomRoles Meteor method leak channel members with special roles to unauthorized clients.
Description
Lack of ACL checks in the getRoomRoles Meteor method allow unauthorized clients to query channel members with special roles:
Meteor.methods({
getRoomRoles(rid) {
check(rid, String);
if (!Meteor.userId() && settings.get('Accounts_AllowAnonymousRead') === false) {
throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'getRoomRoles' });
}
check(rid, String);
return getRoomRoles(rid);
},
});
The rid argument must be a String but is not further validated.
Releases Affected:
- 4.3.1
- 3.18.3
- develop
Steps To Reproduce (from initial installation to vulnerability):
- Open Rocket.Chat
- (Optional) Login as low-privileged user
- Query
getRoomRolesMeteor method with target Room ID
Supporting Material/References:
Proof of Concept
const TARGET_ROOM_ID = "<ROOM_ID>";
Meteor.call("getRoomRoles", TARGET_ROOM_ID, console.log);
Suggested mitigation
- Check for the users access to the channel with given Room ID
rid.
Impact
Unauthorized clients can leak members with special permission of private channels.
Fix
Fixed in versions 4.7.5, 4.8,2 and 5.0.0>
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 method validated only that the room ID was a string and did not verify that the caller had access to that room.
Impact
Unauthorized clients could leak which members held special permissions in private channels.
What the attacker needed
Knowledge of a target room ID; anonymous read may be disabled, so a low-privileged account…
The fix
The issue was fixed in later releases; the suggested mitigation is to check the caller's access to the channel.
How it was found
- Open Rocket.Chat.
- Optionally log in as a low-privileged user.
- Call the getRoomRoles method with the target room ID.
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.
A server method that lists who has special roles in a chat room was callable by anyone who knew the room's identifier. It never checked whether the caller was allowed to see that room, so private channel membership and roles could be read by outsiders.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.