Summary
A critical vulnerability, CVE-2026-45689, has been identified in Rocket.Chat’s built-in OAuth2 server, affecting all versions prior to 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. The flaw is a NoSQL injection (MongoDB operator injection) in the /oauth/token endpoint that allows an unauthenticated remote attacker to obtain valid OAuth access tokens for arbitrary users — including administrators — with a single HTTP POST request. With a CVSS v3.1 base score of 9.1 (Critical), successful exploitation requires no credentials, user interaction, or prior access to the target instance.
Technical details
- Root cause: The OAuth2 server’s grant-parameter validator coerces non-string inputs to strings for regex-based validation (causing crafted objects to pass as
"[object Object]"), but then forwards the original, un-sanitized objects directly into MongoDBfindOne()queries against theoauth_appsandoauth_access_tokenscollections. The/oauth/tokenendpoint lacks thetypeoftype-guards present in/oauth/authorize, leaving it fully exposed. - Trigger conditions: The target instance must have at least one registered OAuth application and at least one refresh token persisted in the
oauth_access_tokenscollection (tokens persist indefinitely after initial user authorization). - Attack vector: An unauthenticated attacker sends a single HTTP POST to
/oauth/tokensubstituting MongoDB operator objects — e.g.,{"$ne": null}— for theclient_id,client_secret, andrefresh_tokenstring parameters. MongoDB matches the first available record and the server issues a fresh, valid{access_token, refresh_token}pair bound to that user. By iterating requests with$ninand$regexoperators, the attacker can walk the entireoauth_access_tokenscollection and harvest one fresh token per user per request. - Impact: Each stolen access token is a first-class bearer credential against the full
/api/v1/*REST surface as the corresponding user. If any harvested token belongs to an administrator, the attacker gains complete admin API access. Admin-level API access includes the ability to install Apps-Engine applications, constituting server-side code execution on the Rocket.Chat host.
Affected software
- Rocket.Chat all versions prior to 7.10.11
- Rocket.Chat 7.11.x through 7.13.x prior to 7.13.7
- Rocket.Chat 8.0.x prior to 8.0.5
- Rocket.Chat 8.1.x prior to 8.1.4
- Rocket.Chat 8.2.x prior to 8.2.3
- Rocket.Chat 8.3.x prior to 8.3.3
- Rocket.Chat 8.4.x prior to 8.4.1
- Rocket.Chat 8.5.x prior to 8.5.0
Severity
CVSS v3.1 Base Score: 9.1 (Critical)
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Mitigation and recommended actions
- Immediate action — patch: Upgrade to one of the fixed releases: 8.5.0, 8.4.1, 8.3.3, 8.2.3, 8.1.4, 8.0.5, 7.13.7, or 7.10.11, depending on your currently deployed branch.
- If immediate patching is not possible: Restrict network access to the Rocket.Chat
/oauth/tokenendpoint at the perimeter (firewall or reverse proxy) to prevent unauthenticated external requests until the patch can be applied. Disabling unused OAuth applications within the admin panel reduces the attack surface but does not fully remediate the vulnerability. - Audit existing OAuth access tokens for anomalous activity and consider revoking all active tokens as a precautionary measure following patching.
IONIX Status
The IONIX research team is tracking ongoing exploitation attempts and recommends immediate patching. Potentially affected assets are outlined in this post.

