The HTTP referer is an optional HTTP header field that identifies the address of the webpage which is linked to the resource being requested. The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed
Exploitation
Request password reset to your email address
Click on the password reset link
Dont change password
Click any 3rd party websites(eg: Facebook, twitter)
Intercept the request in burpsuite proxy
Check if the referer header is leaking password reset token.
Impact
It allows the person who has control of particular site to change the user’s password (CSRF attack), because this person knows reset password token of the user.
If you find a host header attack and it’s out of scope, try to find the password reset button!
Exploitation
Intercept the password reset request in Burpsuite
Add following header or edit header in burpsuite(try one by one)
Check if the link to change the password inside the email is pointing to attacker.com
Patch
Use $_SERVER['SERVER_NAME'] rather than $_SERVER['HTTP_HOST']
Impact
The victim will receive the malicious link in their email, and, when clicked, will leak the user’s password reset link / token to the attacker, leading to full account takeover.