Skip to content

Zomato Account Takeover using Victim's Facebook ID

1 min read

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.

While performing login with Facebook on iOS app, this is the request that was sent to the server:

POST /v2/auth.json?presentlat=xxxxxxx&useragent=model_iPod%20touch_os_9.3.5v_7.0_t_iPod5,1&app_version=7.0&session_id=41&app_run_id=21&presentlon=xxxxxxxx&lang=en&push_permission=1&isFacebook=true&channel_url=&uuid=█████████ HTTP/1.1
Accept-Language: en-IN;q=1, nl-IN;q=0.9, it-IN;q=0.8, de-IN;q=0.7, fr-IN;q=0.6
Accept: /
User-Agent: Zomato/6.6.9 (iPod touch; iOS 9.3.5; Scale/2.00)
X-Zomato-API-Key: █████████
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Connection: keep-alive
app_version: 7.0
Cookie: PHPSESSID=██████████; fbcity=1; fbtrack=c9bce885893ad8387ae3dc855d6f5b97; zl=en
Content-Length: 984
Accept-Encoding: gzip

Looking at it carefully, I found the API was also sending fbid in the requested parameters. So I tried to change it with another Facebook ID. But how to find a victim's Facebook ID as they are different for different apps. By using Facebook's Graph API, you can find a list of your friends as well second degree friends who are using Login with Facebook for Zomato. This Graph API request can return your friends Facebook IDs by sending your Facebook generated Acceess Token.

curl -i -X GET \

Now by using this Facebook ID and replacing it in the Zomato's request, it bypassed the login and gave me a complete control over the victim's account. Game Over!

Share this post:

© 2023 Bhavuk Jain

Built with 💛 + Gatsby