Skip to content
Access control Write-up Beginner

Found 5 BAC in One Single App within 2 Hours

A normal user account could perform administrative actions such as deleting staff, resetting passwords, activating or deactivating users, and changing permissions by swapping their session cookie and sometimes a token or ID value. The server only checked that a valid token was present, not that it belonged to the same user or that the user had the required role.

medium.com

Published on medium.com

As many of you know, I’ve been on the hunt for Broken Access Control (BAC) and logical bugs lately. So, I picked a target and, as usual, headed straight to the User Management section — my trusty starting point!

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

Impact

A normal user could delete other staff, reset anyone's password including the admin's, activate or deactivate any user, and change their own role, leading to full account takeover and privilege escalation.

What the attacker needed

A normal user account; ability to capture and modify requests

How it was found

  1. Create two accounts: one with admin privileges (for testing) and one normal user with no permissions.
  2. Capture an admin request (e.g., delete staff, reset password, activate/inactivate user, change permission) and send it to a repeater tool.
  3. Replace the admin's session cookie with the normal user's cookie.
  4. Replace the token value with the normal user's own valid token (or delete the authenticity token in some cases).
  5. Change the target user ID or email to the desired victim (e.g., manager or admin).
  6. Send the modified request and observe a success response, confirming the action was performed.

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 normal user account should not be able to do admin things like delete staff or reset passwords. The app checked that a login token existed but did not check that the token belonged to the same person making the request or that the person had permission. By changing the cookie and sometimes the token or user ID, the attacker could trick the server into allowing admin actions.

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.