Executive brief
Rocket.Chat is a communications platform used for team collaboration and messaging. A security flaw allows an unauthenticated attacker to bypass login requirements and take over any user account, including administrator accounts. By gaining administrative access, an attacker could steal sensitive communications, modify system settings, or execute malicious code on the server, potentially leading to a full compromise of the organization's internal communications and data.
Technical details
A NoSQL injection vulnerability exists in the `/oauth/token` endpoint of Rocket.Chat due to improper validation of grant parameters. The application fails to ensure that `client_id`, `client_secret`, and `refresh_token` are strings before passing them to MongoDB `findOne()` queries. An unauthenticated attacker can provide MongoDB query operators (e.g., `{"$ne": null}`) in a JSON POST request to bypass client authentication and retrieve the first available refresh token from the database. By using operators like `$nin` or `$regex`, an attacker can iterate through the `oauth_access_tokens` collection to harvest access tokens for all users. If an administrator's token is retrieved, the attacker gains full API access, which can be leveraged for server-side code execution via the Apps-Engine. The issue is fixed in versions 8.5.0, 8.4.1, 8.3.3, 8.2.3, 8.1.4, 8.0.5, 7.13.7, and 7.10.11.
Affected products
- RocketChat Rocket.Chat < 8.5.0, < 8.4.1, < 8.3.3, < 8.2.3, < 8.1.4, < 8.0.5, < 7.13.7, < 7.10.11
Timeline
- 2026-05-14: advisory: Original GitHub security advisory published
- 2026-06-24: disclosed: CVE published to NVD