Skip to content
SQL injection Disclosed report Intermediate

[www.zomato.com] SQLi on `order_id` parameter

The order_id parameter on an endpoint was vulnerable to SQL injection, allowing an attacker to alter query logic and retrieve data using a boolean-based technique.

saltedfish Follow

Originally disclosed on HackerOne

Bounty$1,000 Critical View original
  • Fixed in 5 hours
  • Paid in 5 hours
  • Disclosed after 20 hours

Summary by the program

@saltedfish found that a parameter order_id was vulnerable to SQLi.

###POC (for everyone to learn from this disclosed report)

  • There was an endpoint which had order_id as one of the parameters.
  • Requesting '-if(1=2,'0','1')-' in order_id parameter changed the Response Length and upon further investigation from @saltedfish, he found that the boolean technique could be used to proof data retrieval.

We'd like to thank @saltedfish for helping us in keeping @zomato secure :)

[REQUEST] Also, a small request to everyone reading this report, Burp Suite Free Version offers lot of features to start with and HackerOne has partnered with Burp Suite to offer 3 months free of Burp Suite Pro to Hackers on achieving 500 Reputation Points. Use that opportunity instead of using Pirated Version.

Cheers.

The original report as published on HackerOne, by saltedfish. 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 order_id parameter was concatenated directly into a SQL query without parameterisation or validation.

Impact

An attacker could use boolean-based SQL injection to retrieve data from the database.

What the attacker needed

Access to the endpoint; order_id parameter accepted

How it was found

  1. Find an endpoint that accepts an order_id parameter.
  2. Send a request with a boolean SQL expression in order_id.
  3. Observe that the response length changes, confirming injection.
  4. Use the boolean technique to prove data retrieval.

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.

SQL injection is when user input is inserted into a database query without proper handling, letting an attacker change the query's meaning. Here, changing the order_id value changed the response length, which showed the database was reacting to the input and could be tricked into revealing 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 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.