Skip to content
Access control Write-up Beginner

How I Became Admin of one of the biggest Platform with just one API call?

The profile update endpoint allowed users to set the is_staff field, granting admin access. Separately, user profiles were exposed by numeric ID, leaking email and phone numbers of all users.

AnukarOP Follow

Published on medium.com

So there I was, poking around a competitive coding platform I’d recently signed up for. You know the type: leaderboards, rating systems, daily challenges, the works.

Anukar, 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 user-supplied fields without checking which ones were allowed, and profile lookups did not verify ownership.

Impact

An attacker could become an admin and access the entire admin panel, and any authenticated user could read other users' email and phone numbers.

What the attacker needed

A free account; authenticated user

The fix

The is_staff field was removed from user-writable fields, and sensitive fields were stripped from responses when not the owner.

How it was found

  1. Send a PATCH request to the profile update endpoint with a JSON body containing is_staff set to true.
  2. Observe the response showing is_staff is now true, granting admin panel access.
  3. Send a GET request to /accounts/profile/1/ (or any numeric ID) to retrieve another user's profile.
  4. Observe sensitive fields like email and phone 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 user could change their own profile and sneak in an extra field that made them an administrator. Also, anyone could view other users' private details by simply changing a number in the web address.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by AnukarOP

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.