Skip to content
Account takeover Write-up Intermediate

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.

Aacle Follow

Published on medium.com

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.

Abhishek meena, on medium.com

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

  1. Connect to the /websocket endpoint of the Rocket.Chat instance.
  2. Send a DDP login method call with a username parameter containing a MongoDB query operator that matches any user.
  3. Provide any password in the login request.
  4. 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.

More by Aacle

View all

5 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.