One Missing await = Log In as Anyone: The Rocket.Chat Auth Bypass, Explained
The Rocket.Chat Enterprise ddp-streamer microservice re-implemented login and forgot to await the asynchronous password check, so any password was accepted. Combined with a NoSQL injection in the username lookup, an attacker could log in as any user without knowing their username or password.
In March 2026, GitHub Security Lab dropped three advisories on Rocket.Chat that expose a familiar security problem: re-implementing authentication instead of reusing the existing flow.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the authentication logic was duplicated in a microservice without awaiting the asynchronous password comparison and without validating the type of the username before using it in a database query.
Impact
An attacker could log in as any user without valid credentials, and the same authentication path also skipped 2FA and deactivated-account checks.
What the attacker needed
Rocket.Chat Enterprise Edition with ddp-streamer; Network access to the /websocket endpoint
How it was found
- Connect to the /websocket endpoint of the Rocket.Chat instance.
- Send a DDP login method call with a username parameter containing a MongoDB query operator that matches any user.
- Provide any password in the login request.
- The service finds a user via the injected query and the password check is bypassed due to the missing await, authenticating the attacker as that user.
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 write-up has not been written yet. The Original tab links to the source.
In JavaScript, some functions return a 'Promise', which is a placeholder for a result that will arrive later. The code checked if this placeholder was false, but a Promise object is always considered true, so the password check was skipped. Separately, the username field was passed directly into a database query, allowing special operators to match any user.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.