How I Got My First Valid Bug (and Yes, It Was Just a ')
A product page parameter was vulnerable to SQL injection, confirmed by a verbose database error after a single quote was supplied. Using an automated tool, the author enumerated database names, tables and columns and dumped a sample of email records, and the site owner later said the issue was fixed and offered a bounty.
Published on medium.com
I never thought a single ' could change my mood so much. But that’s how my first valid bug happened.
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 read database contents, including a table of email addresses, which the author frames as a potential data breach.
What the attacker needed
No account needed; target page with a query parameter
The fix
The site owner stated the SQL injection vulnerability had been fixed.
How it was found
- Add a single quote to the end of the product parameter in the page URL and observe the database error.
- Run an automated injection tool against the same URL to list the available databases.
- Enumerate the tables inside the project database.
- Enumerate the columns of the email download table.
- Dump a sample range of rows from that table to show the data at risk.
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 website often builds database queries by pasting in whatever a visitor types into a link. If that input is not handled safely, a visitor can add database instructions of their own, which is called SQL injection. Here a stray quote character made the database complain out loud, and a tool then used that opening to list and read stored records.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.