Critical Bugs: how I found critical bugs without any effort
A search feature on the target website accepted raw database queries directly instead of a normal search term, and it did so without any authentication or authorisation. An attacker could therefore read the database version, user records and almost all other data stored in the database.
Published on medium.com
AHi everyone, it’s been a while, right? This time, I’m going to explain a vulnerability I discovered in the system a few days ago.
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 search input was passed straight into the database as a query, with no authentication, authorisation or input restriction in front of it.
Impact
Anyone, without an account or special rights, could read almost all data in the target's database, including user records.
What the attacker needed
No account needed; reachable search feature
How it was found
- Find candidate subdomains of the target using a search engine dorking query.
- Locate the search feature that takes a database query rather than a normal search term.
- Submit a simple query to read the database version and confirm it works.
- Submit further queries to read user records and other tables.
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.
Some websites have a search box that passes whatever you type straight to the database that stores the site's information. Normally the site checks who you are and limits what the search can do. Here it did neither, so typing a database instruction instead of a search word let anyone read private 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.