From IDOR to Full DB Takeover: How One Parameter Exposed Everythi
An unauthenticated endpoint exposed user data via an IDOR in the 'uiid' parameter, and the same parameter was vulnerable to SQL injection, allowing full database enumeration.
Sometimes, the most devastating vulnerabilities are hiding in plain sight. This was one of those times.
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 endpoint lacked access control on the user ID parameter and built SQL queries by concatenating raw user input instead of using parameterised queries.
Impact
An unauthenticated attacker could read any user's personal data and enumerate the entire database schema and contents.
What the attacker needed
No authentication required; knowledge of a valid user ID
The fix
The endpoint should enforce access control on the user ID and use parameterised queries instead of concatenating raw input into SQL.
How it was found
- Visit the endpoint with the uiid parameter left blank to see an error.
- Enter your own user ID and observe your name and email returned.
- Change the uiid value to 1 and see another user's data.
- Run SQLMap against the endpoint to confirm SQL injection.
- Use SQLMap to enumerate databases, tables, columns, and data.
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.
An IDOR is when a website uses a simple identifier like a user ID in the URL and does not check if you are allowed to see that data. Here, changing the number showed other people's names and emails. The same input was also passed directly into database queries, so an attacker could run their own queries and read the whole database.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.