Skip to content
Access control Disclosed report Beginner

[www.zomato.com] Privilege Escalation - Control reviews - /████dashboard_handler.php

A review-management handler accepted requests from any user without checking privileges, so an unauthenticated or ordinary user could invoke administrative review actions. The reporter demonstrated that anyone could edit an arbitrary review on the site.

gerben_javado Follow

Originally disclosed on HackerOne

Bounty$300incl. $50 bonus View original
  • Fixed in 4 days
  • Paid in 17 days
  • Disclosed after 3 months

#Introduction The handler that controls all the ███ actions for reviews is accessible for any user. The following actions are thus being left open to anyone:

get_manager_status
read███████
unread██████████
████████
feature██████
unfeature████████
moderate████
unmoderate█████
drop
███
send_mail
█████████
revoke
mark-spam
spam-revoke
remove-██████
add-█████████
reject_reported█████████
███████

Taken from the following [██████████]████████

#POC This POC will use the action ██████ since it easily allows us to edit any review on Zomato.com. More severe options could be ██████ to read user info.

HTML
<form action="https://www.zomato.com/██████████dashboard_handler.php" method="POST">
      <input type="hidden" name="action" value="█████" />
      <input type="hidden" name="review_id" value="31268525" />
      <input type="hidden" name="review" value="Privilege+Escalation" />
      <input type="submit" value="Submit request" />
</form>

Go to https://www.zomato.com/review/QvneAY and see the review has changed.

Impact

Any user is able to control all the ████ actions for the reviews section including emailing, deleting, editing and adding to ██████████.

The original report as published on HackerOne, by gerben_javado. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 3 min read.

Context

Zomato is a restaurant discovery and review platform. Reviews on the site can be read, edited, featured, moderated, marked as spam and otherwise managed. The report concerns a single PHP handler on www.zomato.com that performs all of these review-management actions. The handler is named dashboard_handler.php and sits under a path that is redacted in the report.

The researcher's finding is that this handler is reachable by any user, not only by staff or moderators. The action list the handler accepts was taken from a JavaScript file, whose name is redacted in the report. The actions left open to anyone are:

Text
get_manager_status
read███████
unread██████████
████████
feature██████
unfeature████████
moderate████
unmoderate█████
drop
███
send_mail
█████████
revoke
mark-spam
spam-revoke
remove-██████
add-█████████
reject_reported█████████
███████

Several action names are partially redacted in the report, so the full list cannot be reconstructed from it.

Setup

The report describes no special setup. The precondition is simply an account on Zomato, since the handler is accessible to any user. No tools, versions or roles are mentioned beyond that. The proof of concept is a plain HTML form that can be submitted from a browser.

Finding it

The researcher noticed that the handler controlling all the review actions is accessible to any user. The action names were taken from a file whose name is redacted in the report. Seeing management actions such as feature, moderate, send_mail, revoke and mark-spam exposed through a handler that any user can reach is what made the situation look wrong: these are operations that should belong to staff or moderators.

Exploitation

The proof of concept uses the action ██████, which the researcher chose because it easily allows editing any review on Zomato.com. The report notes that more severe options exist, such as ██████, which would allow reading user information.

Step 1: Submit the forged request

The researcher built an HTML form that posts directly to the handler:

HTML
<form action="https://www.zomato.com/██████████dashboard_handler.php" method="POST">
      <input type="hidden" name="action" value="█████" />
      <input type="hidden" name="review_id" value="31268525" />
      <input type="hidden" name="review" value="Privilege+Escalation" />
      <input type="submit" value="Submit request" />
</form>

The form sends three parameters. action selects the operation to perform on the handler. review_id identifies the target review, here 31268525. review carries the new review text, Privilege+Escalation. The form posts directly to the handler, which accepts the request from an ordinary user.

Step 2: Confirm the change

The researcher then visited https://www.zomato.com/review/QvneAY and observed that the review had changed. That confirms the edit was applied.

Root cause

The handler performs review-management actions without verifying that the requesting user has the privilege required for the action. The report does not show the server-side code, so the exact check that is missing is not stated;

Impact

Any user is able to control all the review actions exposed by the handler, including emailing, deleting, editing and adding to reviews. The report hedges the scope of the more severe actions: reading user information through ██████ is described as a possibility rather than demonstrated. The demonstrated impact is editing a review, as shown by the changed review at the linked URL.

Fix

The report does not describe a fix.

Variants to test

  1. Enumerate the action names from client-side JavaScript on other dashboard or management handlers, then send each one as a low-privileged user. A positive result is a state change (a review edited, featured, moderated, deleted or emailed) that the user should not be able to cause.
  2. Send the same request with no session and with a low-privileged session, comparing responses. A positive result is the handler performing the action for the low-privileged session, or returning data that only staff should see.
  3. Try the read-style actions (read███████) against another user's content. A positive result is the response containing that user's information.
  4. A positive result is the action succeeding without a valid anti-CSRF token.

Hunting notes

During recon, look for JavaScript that lists action names or builds requests to a single handler, especially where names such as feature, moderate, revoke or send_mail appear. The signal is a handler that accepts a named action and returns a meaningful response to a low-privileged account.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 9 min read.

What happened, in plain words

Zomato is a website where people look up restaurants and leave reviews about them. Reviews are not just text that sits there: the site has tools to read them, edit them, highlight them ("feature"), check them ("moderate"), mark them as spam, send emails about them, and so on.

The researcher found that the piece of software on the server that carries out all of those review actions could be reached by any ordinary user, not just staff. In security language this is a privilege escalation: someone with low privileges (a normal account) can do things that should require high privileges (a moderator or administrator).

The report names the file that does the work: dashboard_handler.php, sitting on www.zomato.com under a folder path that is blacked out in the report. A file like this that receives requests and performs actions is often called a handler. The researcher also found the list of actions it accepts by reading a JavaScript file, whose name is also blacked out.

Several of the action names in the list are partly blacked out too, so the full list cannot be rebuilt from the report. What is visible is enough to see the problem: names like feature, moderate, send_mail, revoke and mark-spam are management operations, and they were open to anyone.

Background ideas you need first

A few concepts come up again and again, so here they are from zero.

Request. When you type an address into your browser or click a button on a page, your browser sends a message to a server asking it to do something. That message is a request. The server sends back a response, usually a web page or some data.

GET and POST. Requests come in methods. A GET request is normally "give me this page". A POST request is normally "here is some data, do something with it". Submitting a form is usually a POST.

Parameter. A parameter is a named piece of data sent along with a request, like a label on a form field. If a request says action=edit and review_id=31268525, then action and review_id are parameters, and edit and 31268525 are their values.

Handler. A handler is a single server-side file that looks at the parameters it receives and decides which operation to run. Think of a reception desk: you tell the receptionist what you want (the action), and they send you to the right counter. If the receptionist never checks whether you are allowed to go to that counter, anyone can walk in.

Session. When you log in to a website, the server gives your browser a small piece of data, often stored in a cookie, so that it can recognise you on the next request. Every request your browser makes while logged in carries that cookie, which is how the server knows who you are. A request made "in the context of your session" simply means it is sent with your login cookie attached.

Authorisation. Authentication is proving who you are (logging in). Authorisation is deciding what you are allowed to do once you are known. A normal user is authenticated but should not be authorised to moderate reviews. This bug is an authorisation failure.

JavaScript file. JavaScript is the code that runs inside your browser to make pages interactive. Because it runs on your computer, anyone can read it by viewing the page source. If the site's JavaScript contains the list of action names the server understands, that list is effectively public.

Proof of concept (POC). A small, concrete demonstration that a bug is real, rather than a theory. Here it is a tiny web page with a form.

The setup

The report describes no special setup. The only precondition is having an account on Zomato, because the handler is reachable by any user. No tools, software versions or special roles are mentioned. The proof of concept is a plain HTML form that can be submitted from a browser.

Finding it

The researcher noticed that the handler controlling all the review actions was accessible to any user. The action names were taken from a file whose name is redacted in the report.

Seeing management actions such as feature, moderate, send_mail, revoke and mark-spam exposed through a handler that any user can reach is what made the situation look wrong. These are operations that should belong to staff or moderators. The full list of actions left open to anyone, as given in the report, is:

Text
get_manager_status
read███████
unread██████████
████████
feature██████
unfeature████████
moderate████
unmoderate█████
drop
███
send_mail
█████████
revoke
mark-spam
spam-revoke
remove-██████
add-█████████
reject_reported█████████
███████

Line by line, in plain words:

  • ████████ is fully blacked out, so its purpose cannot be known from the report.
  • drop sounds like removing something, but the report does not say what.
  • ███ is fully blacked out.
  • █████████ is fully blacked out.
  • revoke would take something back, but the report does not say what.
  • remove-██████ and add-█████████ are partly blacked out; the visible words suggest removing and adding something.
  • ███████ is fully blacked out.

Because so many names are partly or fully blacked out, the complete list cannot be reconstructed from the report. What matters is the pattern: these are all management operations, and they were all reachable by an ordinary user.

Exploitation

The proof of concept uses the action ██████, which the researcher chose because it easily allows editing any review on Zomato.com. The report notes that more severe options exist, such as ██████, which would allow reading user information. That second option is described as a possibility, not demonstrated.

Step 1: Submit the forged request

The researcher built an HTML form that posts directly to the handler:

HTML
<form action="https://www.zomato.com/██████████dashboard_handler.php" method="POST">
      <input type="hidden" name="action" value="█████" />
      <input type="hidden" name="review_id" value="31268525" />
      <input type="hidden" name="review" value="Privilege+Escalation" />
      <input type="submit" value="Submit request" />
</form>

Line by line:

  • <form ...> opens an HTML form, the same building block used by every login box and search bar on the web.
  • action="https://www.zomato.com/██████████dashboard_handler.php" says where the form's data is sent: straight to the handler file. The folder part of the address is blacked out in the report.
  • method="POST" says the data is sent as a POST request, the method used when you are asking the server to change something rather than just fetch a page.
  • <input type="hidden" name="action" value="█████" /> is a form field the visitor never sees. Its name is action and its value, blacked out in the report, selects which operation the handler should run. This is the parameter that picks the counter at the reception desk.
  • <input type="hidden" name="review_id" value="31268525" /> sends review_id with the value 31268525. This identifies which review is the target. Every review on the site has its own number.
  • <input type="hidden" name="review" value="Privilege+Escalation" /> sends review with the value Privilege+Escalation. This is the new text that will replace the review's content. The + signs are how spaces are encoded in form data, so the text reads "Privilege Escalation".
  • <input type="submit" value="Submit request" /> is the visible button. Clicking it sends everything above to the server.

The form posts directly to the handler, which accepts the request from an ordinary user. The researcher did not need to break into anything; they just asked the server to do something it should have refused.

Step 2: Confirm the change

The researcher then visited https://www.zomato.com/review/QvneAY and observed that the review had changed. That confirms the edit was applied. Visiting the public review page is the verification step: it shows the result to anyone, not just to the person who sent the request.

Root cause

The handler performs review-management actions without verifying that the requesting user has the privilege required for the action. That is like a building where the receptionist trusts the visitor's own note saying which floors they may visit.

Impact

Any user is able to control all the review actions exposed by the handler, including emailing, deleting, editing and adding to reviews. The report hedges the scope of the more severe actions: reading user information through ██████ is described as a possibility rather than demonstrated. The demonstrated impact is editing a review, as shown by the changed review at the linked URL.

Fix

In the reception desk comparison, the receptionist should check your badge against the counter you are asking for, every time, instead of believing what you tell them.

Variants to test

  1. Enumerate the action names from client-side JavaScript on other dashboard or management handlers, then send each one as a low-privileged user. A positive result is a state change (a review edited, featured, moderated, deleted or emailed) that the user should not be able to cause.
  2. Send the same request with no session and with a low-privileged session, comparing responses. A positive result is the handler performing the action for the low-privileged session, or returning data that only staff should see.
  3. Try the read-style actions (read███████) against another user's content. A positive result is the response containing that user's information.
  4. CSRF, or cross-site request forgery, is when another website quietly makes your browser send a request to a site you are logged in to. A positive result is the action succeeding without a valid anti-CSRF token, a secret value that a genuine form from the site would include and a forged one would not.

Hunting notes

During recon, look for JavaScript that lists action names or builds requests to a single handler, especially where names such as feature, moderate, revoke or send_mail appear. The signal is a handler that accepts a named action and returns a meaningful response to a low-privileged account.

Glossary

  • Authorisation: the decision about what a known user is allowed to do. Different from authentication, which is proving who the user is.
  • Authentication: proving who you are, usually by logging in.
  • Cookie: a small piece of data a website stores in your browser so it can recognise you on later requests, for example to keep you logged in.
  • CSRF (cross-site request forgery): an attack where another website causes your browser to send a request to a site you are logged in to, without your intent.
  • CSRF token: a secret value included in a genuine form so the server can tell real submissions from forged ones.
  • GET: a request method normally used to fetch a page or data.
  • Handler: a server-side file that receives a request and performs the operation named in its parameters.
  • HTML form: the standard browser element for collecting data and sending it to a server, usually with a POST request.
  • JavaScript: code that runs inside your browser to make pages interactive; anyone can read it.
  • Parameter: a named piece of data sent with a request, such as action or review_id.
  • POST: a request method normally used to send data and ask the server to change something.
  • Privilege escalation: gaining the ability to do things that should require a higher level of permission than you have.
  • Proof of concept (POC): a small, concrete demonstration that a bug is real.
  • Request: the message your browser sends to a server asking it to do something.
  • Response: what the server sends back.
  • Session: the server's record of your logged-in state, tied to your browser through a cookie.
  • State change: a lasting modification on the server, such as an edited review, as opposed to simply reading a page.

More by gerben_javado

View all

9 more disclosed reports, best first.

More from Eternal

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.