Skip to content
IDOR Write-up Beginner

HOW I Hacked “Welcome to Secure Portal” — IDOR + BAC (P

An agent-level user could change their own role to administrator by tampering with a role identifier in an update request, because the server trusted a client-supplied value. The author also notes that API documentation for the super-admin role made the request easy to craft.

whoami Follow

Published on medium.com

As a Part-time Hunter, it is tough to manage my time to write about my findings! But I always love to share my findings with the community from Twitter/X.

Whoami, 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 server accepted a role identifier from the request body without checking that the caller was allowed to assign that role.

Impact

An agent could escalate their own privileges to administrator, gaining the portal's administrative capabilities.

What the attacker needed

An agent account; a super-admin account for testing; access to API documentation

The fix

The server should ignore client-supplied role values and only allow role changes from an authorised administrative context.

How it was found

  1. Log in as an agent and note the session cookie.
  2. From a super-admin account, change an agent's details and capture the update request.
  3. Replace the admin cookie with the agent cookie in that request.
  4. Change the role identifier in the request body to the admin value and send it.

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 portal lets staff with limited rights (agents) edit their own profile. The request that saves the profile includes a hidden field saying which role the user has. By changing that number, the agent told the server to make them an administrator, and the server believed it.

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 whoami

View all

4 more disclosed reports, 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.