Skip to content
IDOR Write-up Beginner

How I “Accidentally” Became an API Hacker Using Postman

An API endpoint returned a user's profile based on a numeric identifier in the URL, and changing that number returned another user's name and email. An attacker could read other users' profile data by altering the identifier.

medium.com

Published on medium.com

When I first started bug bounty, I thought hacking meant typing green text in a black screen like in movies.

cybertec8, 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 API looked up a profile by the client-supplied user identifier without checking that it matched the authenticated user.

Impact

An authenticated user could read other users' profile details, including name and email address.

What the attacker needed

A normal user account; ability to send API requests

The fix

The API should check that the requested profile belongs to the authenticated user, or use an identifier that cannot be guessed, before returning data.

How it was found

  1. Log in to the web application as a normal user.
  2. Open the browser developer tools and observe the profile API request containing a numeric user identifier.
  3. Send the same request with the identifier changed to a different number.
  4. Receive another user's profile data in the response.

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's API is the part that fetches data for the page. Here the API decided which profile to show purely from a number in the address, without checking that the number belonged to the logged-in person. By changing the number, the author saw someone else's name and email.

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.

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.