Login to any account with the emailaddress
The Google sign-in endpoint accepted a request containing only an email address, without any valid Google OAuth token, and returned a valid access token. An attacker who knew a victim's email address could therefore log in as that user without any interaction from them.
Originally disclosed on HackerOne
- Triaged in 6 hours
- Fixed in 9 days
- Paid in 10 days
- Disclosed after 46 days
Summary by the program
##Introduction An attacker just needs to supply an email address to gain a valid access token for the Zomato applications. Thus any account on Zomato can be fully accessed with just the email address.
#Endpoint
/v2/auth.json
##Impact Critical, without any user interaction an attacker can access any account.
Summary by the researcher
At some point I started focusing on the mobile app, since in my experience a mobile app has more server-side (read criticial) issues, while a webapplication has more client-side vulnerabilities. After testing the login flow for the three different options: Facebook, Google and password based, I noticed that Google login looked slightly weird in the fact that a lot of data was send besides the Google OAuth token. Thus I started stripping parameters one by one after which I noticed that only the email of a user was required to login. This request would look like:
POST /v2/auth.json?isGoogle=true HTTP/1.1
X-API-Key: 4749b89651969b87a3kfc739o254ada2
Content-Type: application/x-www-form-urlencoded
Content-Length: 21
Host: api.zomato.com
Connection: close
[email protected]
Thus I could login as any user on Zomato given I knew their email address.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server trusted the client-supplied email parameter and issued a session token without verifying the Google OAuth token or any other proof of ownership.
Impact
An attacker could fully access any Zomato account with only the victim's email address and no user interaction.
What the attacker needed
Knowledge of the victim's email address; no victim interaction needed
How it was found
- Test the login flow for the Facebook, Google and password options
- Notice the Google login request sends a lot of data besides the OAuth token
- Strip parameters one by one from the request
- Observe that only the email parameter is needed to obtain a login
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 report has not been written yet. The Original tab links to the source.
When you sign in with Google, the app is supposed to check a proof from Google that you really own that account. Here the server skipped that check and handed out a login token to anyone who typed an email address. Knowing someone's email is usually easy, so this let an attacker take over any account.
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.