Skip to content
Account takeover Write-up Intermediate

Zomato Account Takeover using Victim's Facebook ID

The Zomato iOS login endpoint accepted a client-supplied Facebook ID (fbid) alongside the Facebook token, and the server used that ID to identify the account without verifying it matched the token. An attacker could substitute a victim's Facebook ID, obtained via the Graph API friends list, to log in as that user and take over their account.

bhavukjain.com

Published on bhavukjain.com

This was an issue, I reported to Zomato a few months back where an attacker could have compromised any user's account who had linked their Facebook with Zomato. And since most of the people use Login with Facebook nowadays, I was actually able to gain access to over 1000s of user accounts.

The author, on bhavukjain.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 server trusted the client-supplied fbid parameter to identify the account instead of deriving the identity from the verified Facebook access token.

Impact

An attacker could take over any Zomato account linked to Facebook, and the author claims to have accessed over a thousand user accounts.

What the attacker needed

Victim has linked Facebook to Zomato; attacker has a Facebook account; attacker can obtain victim's Facebook ID

How it was found

  1. Capture the login-with-Facebook request from the iOS app, noting the fbid parameter.
  2. Use the Graph API friends endpoint with your own token to obtain a victim's Facebook ID.
  3. Replace the fbid value in the Zomato request with the victim's ID and send it.
  4. Observe that the login is bypassed and you gain control of the victim's account.

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.

When you log in with Facebook, the app sends a token to prove who you are. Here, the app also sent a separate Facebook ID number, and the server trusted that number instead of checking it against the token. An attacker could swap in someone else's ID and the server would log them in as that person.

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.

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.