Skip to content
SQL injection Disclosed report Intermediate

[www.zomato.com] Abusing LocalParams to Inject Code through ███████ query

An endpoint returned a 500 error when a double quote was added to a parameter, suggesting SQL injection. Further investigation showed it could lead to code injection on a server, though the data was public.

bigshaq Follow

Originally disclosed on HackerOne

  • Triaged in 16 hours
  • Fixed in 42 hours
  • Paid in 5 days
  • Disclosed after 5 days

Summary by the program

@bigshaq found an endpoint which was throwing 500 Internal Server Error after adding a double quote, while he thought that this behaviour might well be a SQLi, and after a bit of fuzzing @bigshaq demonstrated why he believed it to be a SQLi >

 - 500 (ISE) > domain.com?type=redacted&id=1"
 - 200 > domain.com?type=redacted&id=1""
 - 500 > domain.com?type=redacted&id=1"""
 and so on.

After some research @bigshaq was able to come up with a POC which resulted in getting the list of all the cities in a single query, we did the investigation internally and found that this could well lead to a Code Injection on one of our Server (which didn't had any sensitive information [those were already public data]).

We would like to thank @bigshaq for his finding which helped us investigate and remediate an issue.

Cheers.

The original report as published on HackerOne, by bigshaq. 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 application failed to properly sanitise user input before using it in a database query, leading to SQL injection.

Impact

The injection could lead to code injection on a server, but the data involved was already public and no sensitive information was exposed.

What the attacker needed

Access to the endpoint; ability to send crafted requests

The fix

The issue was investigated and remediated.

How it was found

  1. Add a double quote to the id parameter and observe a 500 error.
  2. Add two double quotes and observe a 200 response.
  3. Add three double quotes and observe a 500 error again.
  4. Craft a proof-of-concept that retrieves the list of all cities in a single query.

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.

An endpoint returned a 500 error when a double quote was added, suggesting SQL injection. Investigation showed it could lead to code injection on a server holding public data.

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 bigshaq

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.