How a Password Change Feature Led to Full Account Takeover (CVSS 8.3)
The password change endpoint trusted a client-supplied email field to decide which account's password to update, instead of deriving the target from the authenticated session. An attacker with a low-privileged account could change another user's password, including an administrator's, if they knew the victim's current password.
osintteam.blog
Published on osintteam.blog
From the beginning phases in blackbox, I mainly seek for the API keys, hidden endpoints and subdomain takeover possibilities and regular vulnerability scanning options. However, due to the nature of the target application, there were not any register button or misconfigured endpoints.
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 used the email address from the request body to identify the account to update, rather than taking the identity from the authenticated session or token.
Impact
An attacker with a low-privileged account could take over an administrator account, but only if they already knew the administrator's current password; the text notes that rate limits or OTP protections were absent in the test environment.
What the attacker needed
A low-privileged account; knowledge of the victim's current password; no rate limiting or OTP in place
The fix
The application should derive the account to update from the authenticated session or JWT, not from client input, and should require re-authentication or MFA for password changes.
How it was found
- Log in as a low-privileged user and intercept the password change request.
- Observe that the request body contains the email and current password fields.
- Replace the email with the admin's email and the password with the admin's current password.
- Send the modified request; the server changes the admin's password.
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 let a logged-in user say 'change the password for this other email address' and it obeyed, as long as the old password for that other account was supplied. That means a normal user could take over an admin account if they knew the admin's current 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.