[www.zomato.com] Leaking Email Addresses of merchants via reset password feature
A password reset endpoint for restaurant managers returned the email address associated with any restaurant ID without checking ownership. An attacker could enumerate restaurant IDs to extract email addresses of merchants, which are also login identifiers.
Originally disclosed on HackerOne
- Fixed in 15 days
- Paid in 20 days
- Disclosed after 3.2 years
Summary by the program
This was an IDOR that leaked email ids of the merchant restaurants.
Sample response with redacted email:
The report
Hi Team,
Introduction
Found a cool IDOR, which again leaks the email addresses of all Zomato Users. This attack works no matter if you own the restaurant or not.
Proof of Concept
- Below Post Request leaks the email addresses of the Restaurant Owners in response -
Request
POST /php/restaurant_manager_reset_password.php HTTP/1.1
Host: www.zomato.com
Connection: close
Accept: application/json, text/javascript, */*; q=0.01
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
Referer: https://www.zomato.com/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: <Your Cookies HERE>
Content-Type: application/x-www-form-urlencoded
Content-Length: 10
res_id=2100935
Response
{"status":"success","message":"You will receive a recovery mail at ██████████@gmail.com, if it's in our database. Please check your inbox to start the password recovery process."}
- Now, testing with the restaurants against which I don't own (below snapshot), I purposely first found the restaurant which isn't active then I threw this request at that particular restaurant.
███████
- This means, this can help an attacker to extract millions of emails from Zomato's database. This would be a Huge Leak if an attacker gets an access to this POST REQUEST.
Best Regards, Prateek Tiwari
Impact
Impact
This can allow an attacker to extract all the emails from the Zomato Database. A big leak. And we all know emails are of course the logins as well so this I would categorize as the huge leak considering the nature of the business.
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 password reset endpoint looked up the restaurant by the supplied ID and returned the associated email without verifying that the requester had any relationship to that restaurant.
Impact
An attacker could extract email addresses for many merchants; emails are also used as logins.
What the attacker needed
Ability to send HTTP requests; knowledge of restaurant IDs
How it was found
- Send a POST request to the restaurant manager password reset endpoint with a restaurant ID.
- Observe that the response includes the email address associated with that restaurant.
- Repeat with restaurant IDs for restaurants the attacker does not own to confirm the leak.
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.
An IDOR (Insecure Direct Object Reference) happens when a website uses an identifier like a restaurant number in a request but does not check whether the person making the request is allowed to see that restaurant's data. Here, sending a restaurant number to a password reset feature returned the owner's email address even if the attacker did not own that restaurant. This let someone collect many email addresses by trying different numbers.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.