How I Earned $2000 from SQL Injection: A Bug Hunter’s Guide
A profile page parameter was vulnerable to SQL injection, allowing an attacker to retrieve all user details and dump the database including credentials. The hunter used an automated tool to extract data and reported it for a $2000 reward.
Published on theindiannetwork.medium.com
Bug bounty hunting has become one of the most rewarding careers in cybersecurity. One of the most common and high-paying vulnerabilities is SQL Injection (SQLi).
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 application built database queries by concatenating unsanitised user input instead of using parameterised queries.
Impact
An attacker could bypass authentication or fetch unintended data, and in this case retrieve all user details including hashed passwords.
What the attacker needed
A web page with an id parameter; no authentication needed
The fix
The application should use prepared statements (parameterised queries) and validate input, and the text says the company acknowledged the report but does not state that a fix was deployed.
How it was found
- Find a suspicious id parameter on a profile page.
- Insert a simple SQL payload into the URL parameter.
- Observe that the site returns all user details, confirming injection.
- Use an automated SQL injection tool to list databases.
- Dump the users table to retrieve hashed passwords.
- Report the issue with a proof of concept and suggested fixes.
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.
SQL injection is when a website puts user input directly into a database command without checking it, so an attacker can change the command. Here, adding a special string to a web address made the site show every user's details instead of just one. The hunter then used a tool to pull out more data, like passwords.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.