Skip to content
Access control Write-up Beginner

A Critical Bug Let Me Become an Admin on an External Bug Bounty P

The profile update endpoint did not check which fields a normal user was allowed to change, so the author could set their own role to administrator, alter rank and points, toggle two-factor authentication, and store a script payload in the avatar field. The stored script executed when the profile was viewed, and the author claims this could lead to account takeover and further attacks.

Ln0rag Follow

Published on ln0rag.medium.com

Hey everyone! I’m Abdelzaher from Egypt, a bug bounty hunter with the handle @ln0rag.

Ln0rag, on ln0rag.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 and saved any field present in the profile update request without checking the user's permissions or validating the avatar value.

Impact

A normal user could make themselves an administrator, change their rank and points, toggle two-factor authentication, and store a script that runs when the profile is viewed, which could lead to account takeover.

What the attacker needed

A free user account; ability to send custom HTTP requests

How it was found

  1. Create a normal user account and log in.
  2. Request a temporary upload link for the avatar and upload an image to the S3 link.
  3. Send the final profile update request with an avatar value that is not an image URL.
  4. Add extra fields such as role, rank, points and two-factor authentication to the same request.
  5. Refresh the profile page and observe the changed role, rank, points and the script execution.

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 let people edit their profile, but it trusted whatever extra details the browser sent. The author added fields like 'role' and 'points' to the request and the server saved them without asking whether that person was allowed to change them. The same request also stored a small script as the profile picture, which ran when the page loaded.

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.

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.