Account Takeover via IDOR in Password Change Functionality
The password change flow used a client-supplied user identifier in a second request without checking it against the logged-in session. A low-privileged user could change another user's password, including an admin's, by altering that identifier.
medium.com
Published on medium.com
In this article, I will explain a critical authorization flaw was identified in the password change functionality. A low-privileged user was able to change the password of another user, including an admin account, by manipulating the user id in the request.
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
The application validated the current password for the logged-in user but then performed the password change using a client-controlled user identifier without verifying it matched the authenticated session.
Impact
An authenticated low-privileged user could change any other user's password, including an administrator's, leading to account takeover.
What the attacker needed
A low-privileged account; an interception proxy; knowledge of the target user identifier
The fix
The application should derive the user identity from the authenticated session and ignore client-supplied identifiers for account-specific operations, enforcing server-side authorization before any update.
How it was found
- Log in as a low-privileged user and open the password change page.
- Enter the valid current password and a new password, then intercept the workflow with a proxy.
- Forward the first request that validates the current password without modification.
- In the second request that changes the password, replace the user identifier with the target account's identifier.
- Forward the modified request; the server responds with success and the target's password is changed.
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 website should only ever change your own password. Here, the website trusted a number sent by the browser to decide whose password to change, so a logged-in user could swap that number for someone else's and take over their account.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.