Skip to content
XSS Disclosed report Beginner

Reflected XSS on Zomato API

The Zomato restaurant search widget reflected user input without proper encoding, allowing an attacker to inject a script that executes in the victim's browser. An attacker could craft a URL that, when visited, runs arbitrary JavaScript in the context of the Zomato domain.

murat Follow

Originally disclosed on HackerOne

  • Triaged in 4 days
  • Fixed in 2 months
  • Disclosed after 2 months

First of all [here] (https://hackerone.com/reports/115402) is another report looks like this report.

Zomato using APIs for developers to create their restaurant search etc.

You are using res_search_widget which is can be seen right [here] (https://www.zomato.com/widgets/res_search_widget.php).

In the report which is 115402 number that i mentioned start of the report, reporter say something like this:

I use a piece of javascript code that creates an alert box with the document.domain, which shows the SOP is bypassed: "}');alert(document.domain);console.log('. But you dont need to add something to your API or widget code. You should only use '"> characters to bypass security and have xss alert.

So, here is xss:

Just go to your widget from here.

And just write this payload:

'-->">'>'"<script>prompt(document.domain)</script>;" f0r=TRUE

Here is your alert.

Attachments

1.png
1.png From the original on HackerOne

The original report as published on HackerOne, by murat. 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

Impact

An attacker could run JavaScript in a victim's browser when the victim visits a crafted link.

What the attacker needed

Victim clicks a crafted link

How it was found

  1. Go to the Zomato restaurant search widget page.
  2. Enter a crafted payload containing script tags into the widget input.
  3. Observe the script executing and showing an alert with the document domain.

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.

A reflected cross-site scripting (XSS) flaw lets an attacker put a small script into a link. When someone clicks the link, the script runs as if it came from the trusted website, so it can read or change things on that site. Here, the widget page echoed back whatever was typed into it without cleaning it up.

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 murat

View all

1 more disclosed report, 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.