Account TakeOver | Abusing the Application logic flaw in the res
The password reset endpoint included a user ID before the reset token, and the server did not verify that the token belonged to that user ID. An attacker with a valid reset token could change the user ID to any other user who had initiated a password reset, allowing account takeover.
Published on wanderication.medium.com
While hunting on a well tested program on bugcrowd, or so it seemed. I came accross an interesting find.
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 password reset endpoint trusted the user ID parameter without verifying that the reset token was issued for that same user.
Impact
An attacker could initiate a password reset request on behalf of the victim and change their password successfully, leading to account takeover for any user who had already initiated a password reset.
What the attacker needed
Victim has initiated a password reset; attacker has a valid reset token; attacker can guess or enumerate user IDs
How it was found
- Observe the password reset URL containing a numeric user ID before the token.
- Register a new account and initiate the password reset process to obtain a valid token.
- Change the user ID in the reset URL to the new account's user ID while keeping the original token.
- The application allows resetting the new user's password, confirming the flaw.
- Use Burp Suite Intruder to test different user IDs and identify many users vulnerable to takeover.
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 forget your password, a website sends a special link to reset it. This link usually contains a secret code (token) and sometimes a user ID. The bug was that the website checked the secret code but did not check that the code belonged to the user ID in the link. So an attacker could take their own valid reset link, swap in someone else's user ID, and reset that person's password.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.