Skip to content
CORS Disclosed report Beginner

CORS Misconfiguration on www.zomato.com

The CORS policy on www.zomato.com was intended to allow access only from subdomains of zomato.com, but it actually allowed any domain ending in zomato.com, such as notzomato.com. An attacker could register such a domain and read arbitrary data from other users' accounts.

James Kettle Follow

Originally disclosed on HackerOne

  • Fixed in 8 months
  • Disclosed after 9 months

The website at https://www.zomato.com tries to use Cross-Origin Resource Sharing (CORS) to allow cross-domain access from all subdomains of zomato.com. However, due to a flaw in the implementation, it actually allows cross-domain access from all domains ending in zomato.com including notzomato.com as shown in the attached screenshot.

This means anyone who could be bothered registering a domain ending in zomato.com can read arbitrary data from the accounts of other users.

To resolve this issue, simply require that origins end in .zomato.com rather than zomato.com

Attachments

Screen_Shot_2016-09-15_at_12.18.43.png
Screen_Shot_2016-09-15_at_12.18.43.png From the original on HackerOne

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

The origin check used a suffix match on 'zomato.com' instead of requiring a dot before it, so any domain ending in those characters was trusted.

Impact

Anyone who registers a domain ending in zomato.com could read arbitrary data from other users' accounts.

What the attacker needed

Attacker registers a domain ending in zomato.com

The fix

The origin check should require that the origin ends in '.zomato.com' rather than just 'zomato.com'.

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.

CORS is a browser rule that lets a website say which other websites may read its data. This site meant to trust only its own subdomains, but its check was too loose and also trusted any domain that merely ended with the same letters. So someone could buy a similar-looking domain and use it to read private data from logged-in users.

What is CORS?

A permissive cross-origin policy lets another site read responses with the user's credentials.

More by James Kettle

View all

18 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.

CORS misconfiguration

The lesson behind this report.

A permissive cross-origin policy lets another site read responses with the user's credentials.