RocketChat / RocketChat/EmbeddedChat

EmbeddedChatApi.getRoomInfo exposes all user rooms

Open
#1,127 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
165
Forks
381
Avg merge
1d 2h
Merged PRs (30d)
1

Description

The public method EmbeddedChatApi.getRoomInfo() exposes all rooms (public channels, private groups, and direct messages) that the authenticated user has joined, instead of restricting access to the single embedded room context (this.rid).

Internally, getRoomInfo() calls the Meteor method rooms/get using method.call with empty parameters (params: []). By default, rooms/get returns all subscriptions for the calling user.

As a result, any page embedding Rocket.Chat — or any malicious script with access to the globally exposed RCInstance object — can enumerate a user’s private conversations outside the scope of the embedded widget.

This breaks the isolation guarantees of Embedded Chat and results in a severe privacy leak.


Embedded Chat is expected to operate in a sandboxed, single-room context. Exposing all user rooms:

  • Leaks private channels and direct messages
  • Reveals sensitive room metadata (names, IDs, types)
  • Allows host pages or injected scripts to access data beyond the intended embedded scope

This violates user privacy expectations and weakens security boundaries between the host page and Rocket.Chat.


Steps to Reproduce

  1. Authenticate in Embedded Chat using a user account that belongs to multiple rooms (for example: #general, a private group, and one or more DMs).
  2. Open the browser developer console.
  3. Access the embedded API instance and run:
await RCInstance.getRoomInfo();
  1. Inspect the returned value.

Expected Behavior

getRoomInfo() should return information only for the embedded room identified by this.rid.

No metadata for other channels, private groups, or DMs should be exposed.


Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at EmbeddedChatApi.getRoomInfo() and trace its rooms/get method.call invocation, including the this.rid room context. Reproduce with RCInstance.getRoomInfo() for a user in multiple rooms, then verify that the result contains only the embedded room and no other room metadata.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.