Skip to content
IDOR Write-up Beginner

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.

Ali Mezar Follow

Published on medium.com

Sometimes, the most devastating vulnerabilities are hiding in plain sight. This was one of those times.

Ali Mezar, on medium.com

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

  1. Visit the endpoint with the uiid parameter left blank to see an error.
  2. Enter your own user ID and observe your name and email returned.
  3. Change the uiid value to 1 and see another user's data.
  4. Run SQLMap against the endpoint to confirm SQL injection.
  5. 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.

More by Ali Mezar

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

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.