Skip to content
Access control Write-up Beginner

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.

Dennis Sev7n, 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 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

  1. Log in as a regular user and capture the password change request.
  2. Change the username to admin and observe a 403 Forbidden response.
  3. Send an array of usernames including both the regular user and admin.
  4. Observe a 200 OK response with accounts_updated: 2.
  5. Log in as admin using the new password.
  6. 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.

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.