[www.zomato.com] Blind XSS in one of the Admin Dashboard
A blind cross-site scripting vulnerability existed in an address field used when placing an order. The injected script executed when a support agent viewed the order details, allowing script execution in the admin dashboard.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 17 hours
- Paid in 18 hours
- Disclosed after 59 days
Summary by the program
@sandeep_hodkasia identified a Blind XSS vulnerability that fired in one of our admin dashboard.
POC
-
@sandeep_hodkasia added
"><script>alert(0);</script>[XSS Hunter was used in this case] in address field while placing an order. -
XSS triggered when one of our support agent viewed the order details.
Thanks @sandeep_hodkasia for helping us keep @zomato secure :)
Best, Prateek
What the report shows
The feature involved is the order placement flow, together with the admin dashboard that support agents use to review orders. The bug class is stored cross-site scripting, and the specific variant here is blind XSS: the payload is submitted on one surface and executes later, in a different application, in front of a different user.
The researcher, @sandeep_hodkasia, placed an order and entered the following payload in the address field:
"><script>alert(0);</script>
The report notes that XSS Hunter was used in this case, which is the usual way to detect a blind XSS: the injected script calls back to an external listener when it runs, so the hunter learns that execution happened, on which page, and in which browser context, without ever seeing the victim's screen.
The payload fired when one of Zomato's support agents viewed the order details. That is the whole chain: customer-controlled input stored by the ordering system, rendered unsafely in an internal back-office view, and executed in the agent's session.
The report does not give a severity rating, a CVSS score, a bounty amount or details of the fix. It is a short disclosure consisting of the program's summary and the proof of concept above.
Root cause
The likely cause is that the address value supplied during checkout was stored and later rendered into the admin order-details page without output encoding, so the " in the payload closed an HTML attribute and the following <script> element was parsed as markup. The payload's leading ">< is the classic shape for breaking out of a quoted attribute inside a tag, which suggests the value was placed into an attribute such as a value, title or data field rather than directly between tags. The report itself does not show the vulnerable markup, so the exact sink is not confirmed.
Two failures combine here. The first is missing contextual output encoding on the admin side. The second is architectural: the same data crosses a trust boundary from a public, attacker-controlled form into a privileged internal interface, so any rendering mistake there is far more serious than on the storefront.
Impact
In the report's own terms, the consequence is script execution in the session of a support agent who views the affected order. Because the agent is logged into the admin dashboard, an attacker who controls that script could act with the agent's privileges: read order data, perform actions the dashboard exposes, or exfiltrate session material. The report does not enumerate what the dashboard allowed or demonstrate any post-exploitation step, so the practical ceiling of the attack is not established in the text. The realistic impact is script execution in the session of an authenticated internal user.
How this kind of bug works
Stored XSS happens when an application persists user input and later emits it into an HTML document without encoding it for the context in which it appears. The browser cannot distinguish data from code, so any markup the attacker plants is parsed and executed as part of the page. Blind XSS is the same mechanism with a delay and a change of audience: the input is submitted on one surface and rendered on another, often an admin panel, a moderation queue, a log viewer, a support ticketing tool or an email client, which the hunter cannot see directly.
The reason it persists is that input validation is usually applied at the entry point, while the dangerous decision is made at the output point, in a different codebase, framework or team. Escaping that is correct for one context (an HTML body) is wrong for another (an attribute, a URL, a JavaScript string, a CSS block). Modern frameworks auto-escape by default, but back-office tools are often older, built quickly, or assembled from templates that concatenate strings.
Defences that stop it are contextual output encoding at every sink, a restrictive Content Security Policy that blocks inline script, and treating all data that crosses from public to privileged interfaces as untrusted. HttpOnly cookies limit session theft but do not prevent an attacker from acting through the victim's browser.
How to test for it
- Map every place where your input is stored and might later be displayed to someone else: profile fields, addresses, order notes, support messages, file names, user-agent and referrer headers, coupon codes, and any field that appears in a confirmation email or export.
- Use a unique, non-destructive probe that calls back to a listener you control, so you can tell whether and where execution happened. Keep the probe identifiable so you can correlate the callback with the field you filled in.
- Submit the probe in each candidate field, then trigger the flows that would cause a human or a system to view the data: place the order, open a ticket, request a callback, wait for moderation.
- Watch the listener for a hit. A positive result is a callback from the target's domain, ideally with the page URL, the DOM context and the victim's browser details, which tells you which sink fired.
- Confirm the context from the callback data and, if you have a legitimate test account with the relevant role, reproduce it yourself in the back-office view.
Common false positives: a callback from your own browser because you viewed the page while logged in as yourself; a probe that was reflected rather than stored; a hit on a page that renders the value inside a sandboxed iframe or with a CSP that blocks execution; and email clients that fetch remote content, which can look like execution but is only a prefetch. Check the reported origin and page before claiming a finding.
How it is fixed
Apply contextual output encoding at the sink, using the encoding appropriate to HTML text, attributes, URLs and script blocks. Prefer templating engines with auto-escaping and avoid string concatenation when building markup. Validate and normalise input on the way in as defence in depth, but do not rely on blocklists of tags or characters. Add a Content Security Policy that disallows inline script and restricts script sources, set HttpOnly and SameSite on session cookies, and review back-office interfaces separately from public ones, since they are often built by different teams with different standards.
Hunting notes
Blind XSS hides wherever data written by one user is read by another with more privileges: support dashboards, admin order views, fraud review queues, CRM integrations, log and error viewers, and notification emails. Recon signals include separate admin or internal hostnames, references to back-office tooling in JavaScript bundles, and features that promise a human will review your submission. Header-borne values such as user-agent and referrer are worth probing because they are frequently logged and displayed raw.
To get a report accepted, show the callback with the executing origin and page, explain which field carried the payload and which internal view rendered it, and describe the privilege of the user who triggered it. Keep the payload minimal and non-destructive, avoid touching real customer data, and stop at proof of execution unless the program invites further demonstration.
What happened, in plain words
When you order, you type your delivery address into a form, and that address is saved with the order. Later, a support agent opens the order in an internal admin dashboard, a private back-office tool that customers never see, to check the details.
The researcher, @sandeep_hodkasia, placed an order and added a small piece of code in the address field:
"><script>alert(0);</script>
When a support agent later opened the order details, the code ran inside the agent's browser, in the agent's logged-in session on the admin dashboard. The program's summary describes exactly this: the payload was added in the address field while placing an order, and it triggered when a support agent viewed the order details.
This is called blind cross-site scripting. "Cross-site scripting" (XSS) means getting your own code to run inside someone else's web page. "Blind" means the person who submits the code cannot see where it lands: the researcher typed into a public order form, but the code executed somewhere else entirely, in a private tool, in front of a different person. The report notes that a tool called XSS Hunter was used. Such tools give the researcher a private listening address; the injected script quietly contacts that address when it runs, so the researcher learns that it fired, on which page, and in which browser, without ever seeing the agent's screen.
Why the payload looks like that
"><script>alert(0);</script>
"closes a quoted value. Web pages are built from HTML, a text format made of tags such as<input value="...">. If the address is placed inside such a quoted attribute, this quote ends the value early.>closes the tag itself, so whatever comes next is treated as new markup rather than as part of the address.<script>alert(0);</script>is a script element. Everything between the tags is code the browser runs.alert(0)simply opens a small pop-up showing0, a harmless way to prove that code executed.
The leading "> is the classic shape for breaking out of a quoted attribute. That suggests the address was inserted into an attribute of a tag rather than directly between tags, but the report does not show the vulnerable page, so the exact spot is not confirmed.
Why it matters
The support agent was logged into the admin dashboard. Any script running on that page runs with the agent's access: it could read order information or perform actions the dashboard offers. The report does not list what the dashboard allowed and does not show any follow-up step, so how far an attacker could go is not established. What is clear is the jump in privilege: input from a customer-facing form reached the browser session of a trusted internal user.
The report gives no severity rating, no CVSS score, no bounty amount and no details of the fix.
In general, how this kind of bug works
Stored XSS happens when a site saves what a user typed and later puts it into a page without encoding it. Encoding means converting special characters into harmless equivalents, so a < that a user typed is displayed as text rather than treated as the start of a tag. A browser cannot tell data from code: if the saved text contains markup, the browser parses and runs it as part of the page.
Blind XSS is the same mechanism with a delay and a change of audience. You submit on one surface, such as a checkout form, and the value is displayed on another, such as an admin panel, a moderation queue, a log viewer or a support ticketing tool, which you cannot see.
The mistake usually lives at the output point, not the input point. Checking input when it arrives feels natural, but the dangerous decision is how the value is written into the page later, possibly by a different team or an older tool. Escaping that is right for one place (between tags) is wrong for another (inside an attribute, a URL or a script). Back-office tools are often built quickly or from templates that glue strings together, which is why they are a common home for this bug.
How to test for it
- List every place your input is stored and might later be shown to someone else: profile fields, addresses, order notes, support messages, file names, and values such as the browser's user-agent or the referring page, which are often logged and displayed.
- Use a unique, harmless probe that contacts a listener you control, so you can tell whether and where it ran. Keep it identifiable so you can match a hit to the field you filled in.
- Submit the probe in each candidate field, then trigger the flows that make a person or system view the data: place the order, open a ticket, wait for moderation.
- Watch the listener. A real hit comes from the target's domain and ideally reports the page address, the surrounding page context and the browser details, which tells you which display point fired.
- Confirm from that data, and if you have a legitimate test account with the right role, reproduce it yourself in the back-office view.
Common false positives: a hit from your own browser because you viewed the page while logged in as yourself; a probe that was merely echoed back rather than saved; a page that shows the value inside a sandboxed frame or under a policy that blocks scripts; and email clients that load remote content, which looks like execution but is only a prefetch. Check the reported origin and page before claiming a finding.
How it is fixed
Encode output at the point of display, using the encoding that fits the place: page text, attribute, URL or script. Prefer templating engines that escape automatically and avoid gluing strings together to build markup. Validate input on the way in as an extra layer, but do not rely on blocklists of tags or characters. Add a Content Security Policy, a browser instruction that says which scripts may run and blocks inline ones, mark session cookies HttpOnly so scripts cannot read them, and review back-office interfaces separately from public ones, since they are often built by different teams to different standards.
Hunting notes
Blind XSS hides wherever data written by one user is read by another with more privileges: support dashboards, admin order views, fraud review queues, log and error viewers, notification emails. Useful signals are separate admin or internal hostnames, references to back-office tools in page scripts, and features that promise a human will review your submission. To get a report accepted, show the callback with the executing origin and page, say which field carried the payload and which internal view displayed it, and describe the role of the person who triggered it. Keep the payload minimal and harmless, avoid real customer data, and stop at proof of execution unless the program invites more.
Glossary
- XSS (cross-site scripting): getting attacker-supplied code to run inside another person's web page.
- Stored XSS: XSS where the malicious input is saved by the site and runs later, when someone views it.
- Blind XSS: stored XSS where the input is submitted on one surface and runs on another the attacker cannot see, such as an admin panel.
- Payload: the piece of input crafted to trigger the bug.
- HTML: the text format web pages are made of, built from tags such as
<input>. - Tag and attribute: a tag is an element such as
<input>; an attribute is a named value inside it, such asvalue="...". - Script element: an HTML tag whose content is code the browser executes.
- Encoding (escaping): converting special characters into harmless text so they are displayed rather than interpreted.
- Sink: the place in the page where stored data is written out, and where encoding must be correct.
- Admin dashboard / back office: a private internal tool used by staff, not customers.
- Session: the logged-in state a site keeps for a user, usually tied to a cookie.
- Cookie: a small value the browser stores for a site and sends back with each request, often used to identify the session.
- HttpOnly: a cookie setting that stops page scripts from reading that cookie.
- Content Security Policy (CSP): a browser instruction from the site saying which scripts may run, used to block inline script.
- Privilege escalation: gaining more access than you were given, here from a customer to an internal staff session.
- XSS Hunter: a service that provides a listening address so a researcher learns when and where an injected script runs.
- CVSS: a standard scoring system for the severity of a vulnerability.
- False positive: a result that looks like a finding but is not one.