This writeup is about account takeover vulnerability I observed in multiple websites during private penetration testing.
The write-up describes four account takeover issues found during private testing: email changes were not verified and old emails remained mapped to the account, password reset requests could be modified to target another user's email, password change requests lacked rate limiting and could be brute-forced, and a password update API accepted a user identifier and auth parameter that could be obtained through broken access control. An attacker could use these flaws to reset another user's password and take over their account.
medium.com
Published on medium.com
Let me break it down. This is the bug here.
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 multiple flaws: email changes were saved without verification and old emails were not removed, password reset and change requests trusted user-supplied email or user ID values, and a password update API relied on an auth parameter that could be fetched via broken access control.
Impact
An attacker could take over user accounts permanently, and even after the user recovers the account, the attacker could regain access because the old email remained mapped to the account.
What the attacker needed
Physical access to a logged-in session (Tale-1); ability to intercept requests (Tale-2, Tale-3, Tale-4); a registered account (Tale-3, Tale-4); no rate limiting (Tale-2)
The fix
The report recommends expiring old password reset links after an email change, preventing login with unverified emails, binding reset tokens to the user, not exposing critical auth parameters, avoiding forgeable JWT tokens, using stateful CSRF tokens, and adding rate limiting.
How it was found
- Log in to the victim's account and change the email to the attacker's email, then revert it to the original email.
- Request a password reset using the attacker's email and receive a reset link.
- Use the reset link to set a new password, then log in with the attacker's email and the new password to access the victim's account.
- For the password change brute force: intercept the password change request and send it to an intruder tool.
- Use a cluster bomb attack with old password and user ID as payloads to brute force the old password and enumerate user IDs.
- For the password reset API: request a reset for the attacker's email, intercept the request, and change the email to the victim's email before submitting the new 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.
An account takeover means someone else can log into your account and control it. Here, the websites made mistakes in how they handled email changes and password resets, so an attacker could trick the system into sending a reset link to their own email or changing the password for someone else's account. Some of the attacks also needed physical access to a logged-in computer or the ability to guess a user ID and old 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.