How I Found My First SQLi Vulnerability (€3500 Bounty)
A BMI calculator's weight parameter was vulnerable to SQL injection, as shown by a single quote causing a 500 error that disappeared with a second quote. The author then used a time-based payload to confirm the injection and reported it, leading to a fix and a bounty.
medium.com
Published on medium.com
“This is a story about how I found my first SQL injection (SQLi) bug in a private program. Although I’m not new to this field, finding SQLi has become challenging due to the implementation of new types of web application firewalls (WAFs).
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
Impact
An attacker could potentially access, modify, or delete sensitive data, or take control of the database server, though the report only confirms the injection and does not demonstrate data extraction.
What the attacker needed
Access to the private program; ability to intercept HTTP requests
The fix
The vulnerability was fixed by the security team after being reported.
How it was found
- Find a BMI calculator on the target website.
- Enter height and weight, capture the request, and send it to a repeater tool.
- Insert a single quote in the unitWeight parameter and observe a 500 error.
- Add a second single quote to fix the query and see the error disappear.
- Try a time-delay payload and observe a delayed response, confirming SQL injection.
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 sneak in extra commands. Here, typing a single quote broke the database query and caused an error, which is a classic sign of this bug. The author then used a special input that made the database wait, proving they could control it.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.