Fun with Header and Forget Password
The password reset email used the Referer header to build the recovery link, so an attacker could set that header to their own domain and have the victim's reset token sent to them. An attacker could then use the stolen token to change the victim's password.
Published on medium.com
This one doesn’t have that awful caveat compared to my other article:) Playing around with headers is important during bug hunting. But, it’s easy to limit yourself to just sending GET requests with blind xss/blind sqli/blind rce/etc. inside Referer, User-Agent, Cookies, custom headers, etc.
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 steal a victim's password reset token and use it to change the victim's password, leading to account takeover.
What the attacker needed
Victim clicks the poisoned reset link; attacker can intercept the reset request; attacker controls a domain to receive requests
How it was found
- Enter the email address of the test account in the forgot password form.
- Intercept the POST request that sends the reset email.
- Change the Referer header to a domain controlled by the attacker.
- Open the reset email and click the poisoned link.
- Check the attacker's logs for a request containing the victim's reset token.
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 ask a website to reset your password, it sends you an email with a special link. This site built that link using a value the browser sends called the Referer header, which normally says which page you came from. An attacker can change that value to their own website, so the email link points to the attacker, and when the victim clicks it the secret token in the link goes to the attacker.
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.