Critical Blind SQL Injection leads to $4,134 (7/30 DAYS)
A blind SQL injection existed in an inDrive API endpoint that took numeric path segments and built database queries from them. An attacker could change the numbers and add SQL conditions to make the server return data or nothing, confirming the injection and allowing extraction of database information such as the PostgreSQL version.
medium.com
Published on medium.com
I’m a security researcher, and I’ve taken on the challenge of explaining one bug bounty report every day for the next 30 days — 30 reports!
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the API endpoint inserted numeric path segments directly into a SQL query without parameterisation or validation.
Impact
Attackers could retrieve sensitive data from the database and potentially alter or delete critical data, though the text does not show extraction beyond the database version.
What the attacker needed
Access to the public promo page; ability to send crafted API requests
The fix
User input should be validated and parameterised so it cannot change the structure of database queries.
How it was found
- Open the promo page and click the generate button to trigger the API request.
- Change the numeric path segments in the request URL to include a SQL condition.
- Observe that the response returns random data, showing the condition was executed.
- Change the condition to a false one and observe an empty response, confirming the injection.
- Use the true/false responses to extract database information such as the SQL version.
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 write-up has not been written yet. The Original tab links to the source.
A blind SQL injection is when a website puts user input directly into a database command, but does not show error messages. The attacker asks yes/no questions through the input and watches whether the page returns data or stays empty, slowly learning secret information.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.