CSRF To Like/Unlike Photos
The photo like/unlike endpoint accepted POST requests without a CSRF token, so an attacker could make a logged-in victim's browser submit a forged request to like or unlike any photo. This could be used to inflate likes on the attacker's photos or reduce likes on a competitor's photos.
- Triaged in 4 days
- Fixed in 16 days
- Disclosed after 38 days
Description: There is a CSRF vulnerability allowing an attacker to trick a user into visiting his/her site and to forge a request to zomato.com that will in turn like or unlike the photos of the attacker's choosing.
The vulnerable page is https://www.zomato.com/php/photoViewerActionsHandler.php , which doesn't need a csrf token or anything like that in a POST request to like or unlike photos. The request looks like this: POST /php/photoViewerActionsHandler.php Parameters: type = UNLIKE_PHOTO (Or LIKE_PHOTO) photo_id = [photo id]
To get the photo id you just have to click on the photo you want the victim to like or unlike, then when you look at the url it should look something like: /es/photos/pv-res-18342981-r_2MzMzNTg1NzIwO the last section will be /pv-res-[number]-[photo id]
Once you have the photo id you can perform the CSRF attack easily.
Steps to reproduce:
- Deploy a webserver with an index.html file:
(Change the value attribute for the input tag with the name attribute of photo_id with the target photo's id and the input tag with the name attribute of type with UNLIKE_PHOTO if you want the victim to unlike a photo. 2. Get a victim to visit the webserver.
When done in large numbers you can easily get a photo to get 100's of likes. You can also damage a restaurant's reputation by using this attack to decrease their likes, and improve your own restaurant's reputation by using this attack to increase their likes.
Hope it helps. Sincerely, Pablo
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
Impact
An attacker could make a logged-in victim like or unlike photos of the attacker's choosing, potentially inflating likes on their own photos or reducing likes on a restaurant's photos.
What the attacker needed
Victim is logged in to the site; victim visits attacker-controlled page
How it was found
- Find the photo id by opening the target photo and reading the last part of the URL.
- Host a page containing a hidden form that posts to the photo action handler with the chosen action and photo id, and auto-submits it.
- Get the victim to visit that page while logged in to the site.
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 are logged in to a website, your browser automatically sends your session cookie with every request to that site. A cross-site request forgery (CSRF) attack tricks your browser into sending a request the attacker chose, such as liking a photo, while you are logged in. Because the site did not check for a secret token that only its own pages know, it could not tell the forged request from a real one.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.