Skip to content
Info disclosure Disclosed report Beginner CVE-2022-35247

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.

gronke Follow

Originally disclosed on HackerOne

Medium 5.3 View original
  • 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:

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

  1. Open Rocket.Chat
  2. (Optional) Login as low-privileged user
  3. Query getRoomRoles Meteor method with target Room ID

Supporting Material/References:

Proof of Concept

JavaScript
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>

The original report as published on HackerOne, by gronke. 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

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

  1. Open Rocket.Chat.
  2. Optionally log in as a low-privileged user.
  3. 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.

More by gronke

View all

27 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.