Tanuki: Admin Account Takeover via Mass Password Update
The password change endpoint accepted a username parameter and allowed an array of usernames, updating multiple accounts without verifying ownership for each. An attacker could change the admin's password and take over the account.
medium.com
Published on medium.com
Take over the admin account by exploiting a flaw in the password change functionality that allowed updating multiple accounts at once.
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 iterated over the username array but only validated ownership for the first entry, allowing mass assignment of passwords.
Impact
An attacker could take over the admin account and access the Admin Dashboard.
What the attacker needed
A free account; ability to intercept requests
The fix
Password change endpoints should never accept a username parameter; identity should come from the session token only.
How it was found
- Log in as a regular user and capture the password change request.
- Change the username to admin and observe a 403 Forbidden response.
- Send an array of usernames including both the regular user and admin.
- Observe a 200 OK response with accounts_updated: 2.
- Log in as admin using the new password.
- Access the Admin Dashboard and capture the flag.
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.
When you change your password, the server should know who you are from your login session, not from a username you send. Here, the server trusted a username field and only checked the first one, so sending a list let the attacker also change the admin's password.
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.