A Tale Of Account Takeover
The forgot password flow had no rate limiting on the first step, allowing username enumeration, and the second step (secret question) could be bypassed by directly requesting the third step because only the referer header was checked. An attacker could take over any account by enumerating valid usernames and skipping the secret question.
Published on infosecwriteups.com
Reset Or Forgot Password is one of the most important functionalities when it comes to the security of an application. If an attacker can bypass the password reset/change functionality by any means.
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
Impact
An attacker could take over any account in the database by enumerating valid usernames and bypassing the secret question step.
What the attacker needed
No rate limiting on username step; knowledge of valid username; ability to intercept and modify requests
How it was found
- Capture the first step request (username submission) and send a list of common usernames from SecLists.
- Filter responses to identify valid usernames (about 10 out of 500).
- Observe that the first step sets a cookie used in later steps.
- Compare requests from the second and third steps; note that only the URI and referer headers differ.
- Modify the request to skip the second step and go directly to the third step, using the cookie from the first step.
- Combine all three steps to perform account 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.
A password reset process often has several steps, like entering a username, answering a secret question, and setting a new password. Here, the first step let someone try many usernames quickly to find valid ones, and the second step could be skipped entirely by going straight to the third step. This meant an attacker could reset anyone's password without knowing the secret answer.
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.