Skip to content
Account takeover Disclosed report Beginner

Password Reset link hijacking via Host Header Poisoning leads to account takeover

The password reset form used the Host header from the incoming request to build the reset link sent by email. An attacker could change that header to their own server, so the victim's reset token would be sent to the attacker, allowing account takeover.

Hemant Patidar Follow

Originally disclosed on HackerOne

Critical View original
  • Triaged in 1 hour
  • Fixed in 36 days
  • Disclosed after 39 days

Description: ████████ uses the Host header when sending out password reset links. This allows an attacker to insert a malicious host header, leading to password reset link / token leakage.

References

http://www.skeletonscribe.net/2013/05/practical-http-host-header-attacks.html https://hackerone.com/reports/226659

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.

System Host(s)

███

Affected Product(s) and Version(s)

CVE Numbers

Steps to Reproduce

1.) Open up Firefox and Burp Suite. 2.) Visit the forgot password page (http://██████/█████) 3.) Enter the victim's email address and click on SEND RESET LINK. 4.) Intercept the HTTP request in Burp Suite & change the Host Header to your malicious site/server ex. ███. 5.) Forward the request and you'll be redirected to your server.

The victim will then receive a password reset e-mail with your poisoned link. If the victim clicks the link, the reset token will be leaked and the attacker will be able to find the reset token in the server logs. The attacker can then browse to the reset page with the token and change the password of the victim account!

Suggested Mitigation/Remediation Actions

Use $_SERVER['SERVER_NAME'] rather than $_SERVER['HTTP_HOST']

The original report as published on HackerOne, by hemantsolo. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The application trusted the client-supplied Host header to construct the password reset URL instead of using a fixed server name.

Impact

The victim receives a reset email containing the attacker's host, and clicking it leaks the reset token, leading to full account takeover.

What the attacker needed

Victim's email address known; victim clicks the poisoned link; attacker controls a server to receive requests

How it was found

  1. Open Firefox and Burp Suite.
  2. Visit the forgot password page.
  3. Enter the victim's email address and submit the reset request.
  4. Intercept the request in Burp Suite and change the Host header to the attacker's server.
  5. Forward the request; the victim receives an email with the poisoned reset link.
  6. When the victim clicks the link, the reset token is leaked to the attacker, who can then use it to change the victim's 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 report has not been written yet. The Original tab links to the source.

When you ask a website to reset your password, it emails you a special link containing a secret token. This site built that link using a value (the Host header) that the visitor's browser sends, and an attacker can change it. By changing it to their own server, the email link pointed to the attacker, who could then read the token and take over the account.

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.

More by Hemant Patidar

View all

2 more disclosed reports, best first.

More from U.S. Dept Of Defense

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.