Skip to content
Access control Write-up Intermediate

Admin Account Takeover

A user holding a low-privilege custom role with user-management permission could change the admin user's email address, even though other admin-level user management actions were blocked. The attacker changed the admin email to one they controlled, then used the forgot-password flow to reset the password and take over the admin account.

Ronak Patel Follow

Published on infosecwriteups.com

Today, I am writing article about Admin Account Takeover Bug which I found on the Private program. I mostly works with the Private programs and was waiting for these programs to move to public so i could disclose this bugs.

Ronak Patel, on infosecwriteups.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 email-change action on the user management page was not checked against the target user's privilege level, so a lower-privileged custom role could modify a higher-privileged admin's email.

Impact

A low-privileged custom role user could take over the admin account, giving them full administrative control of the application.

What the attacker needed

A custom role with user management permission; a logged-in low-privilege account; attacker-controlled email address

How it was found

  1. Log in as a custom role user that has user management permission
  2. Open the user management functionality
  3. Change the admin user's email to an address the attacker controls
  4. Receive the confirmation email at the new address
  5. Use the forgot password function to get a reset link at the attacker's email
  6. Set a new password and take over the admin account

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 custom role is a set of permissions an admin hands to a normal user. Here that user was meant to be less powerful than the admin, but the site still let them edit the admin's email address. Because the password reset link goes to whatever email is on the account, the attacker could receive it and set a new password, taking over the admin account.

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 Ronak Patel

View all

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