Strange SQL Injection on a public program
An admin test page accepted a query parameter that was passed unsafely to a database, producing verbose SQL errors. An attacker could use it to read user and admin emails, hashed passwords, coupons and order data.
medium.com
Published on medium.com
In the blog I will discuss a really strange SQLi scenario, that I’ve found recently on a public VDP.
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 admin test page concatenated the query parameter into a SQL statement without parameterisation or input validation.
Impact
The database exposed user and admin emails with MD5 password hashes, discount coupons and customer order information.
What the attacker needed
Access to the public site; none
The fix
The endpoint was removed from the application the day after the report was accepted.
How it was found
- Find the admin dashboard page through directory fuzzing.
- Try fuzzing query parameters on that page without success.
- Send the previously known parameter name to the page.
- Observe verbose SQL errors confirming 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.
A web page took a value from the address bar and put it straight into a database query without checking it. By sending special database instructions instead of a normal value, the tester made the database reveal its contents, including account details.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.