My First Account Takeover Via Password Reset Poisoning
The password reset form built the reset link using the attacker-controlled Host header, so a request with a modified Host caused the victim's reset email to point at the attacker's server. The attacker could then capture the reset token from that server and use it to set a new password and log in as the victim.
Published on medium.com
Hey there everyone! It’s cyberpro151 here and in today’s article, I’ll share with y’all that how I was able to find an Account Takeover vulnerability via Password Reset Poisoning on a VDP program.
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 application used the untrusted Host header to construct the absolute URL in the password reset email instead of a fixed configured domain.
Impact
An attacker could take over a victim's account by capturing the reset token and setting a new password, provided the victim clicks the poisoned link.
What the attacker needed
Victim's email address known; victim clicks the poisoned reset link; attacker controls a server to receive requests
The fix
The reset link should be built from a fixed, configured domain rather than the Host header, and the Host header should be validated against an allowlist.
How it was found
- Open the password reset page and submit the victim's email address.
- Capture the reset request in an intercepting proxy.
- Replace the Host header with a domain controlled by the tester.
- Send the request and confirm a reset email is delivered.
- Poll the controlled server and read the reset token from the incoming request.
- Use the token on the reset page to set a new password and log in.
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 emails you a special link that lets you set a new one. This site built that link using a value the visitor's browser sends called the Host header, which tells the server which site name was requested. By changing that value, the attacker made the email link point to their own server, so when the victim clicked it the secret token in the link was sent to the attacker instead.
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.