Skip to content
Account takeover Write-up Beginner

Host Header Injection in Password Reset Function Leading to Account Takeover and Blind SSRF

The password reset function accepted an attacker-supplied Host header without validation, so the reset email contained a link pointing to the attacker's domain. If the victim clicked the link, the reset token was sent to the attacker, who could then reset the victim's password and take over the account; the same injection also caused the server to make requests to the attacker's domain, indicating blind SSRF.

mhmodgm54 Follow

Published on medium.com

In this write-up, I describe a Host Header Injection vulnerability in a password reset functionality that leads to a 1-click Account Takeover (ATO) through Password Reset Poisoning.

Mahmoud Gamal, on medium.com

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 build the password reset URL without validating it against an allowlist.

Impact

An attacker could achieve full account takeover with one click by the victim, and the server also made blind requests to the attacker's domain, though the text only suggests this as a possible SSRF.

What the attacker needed

Victim clicks a link; attacker-controlled domain

How it was found

  1. Send a normal password reset request and intercept it.
  2. Modify the Host header to an attacker-controlled domain and forward the request.
  3. Observe that the reset email contains a link pointing to the attacker's domain.
  4. Have the victim click the poisoned link so the reset token is sent to the attacker.
  5. Use the captured token to reset the victim's password and take over the account.

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 that contains a secret code. This report shows that the website trusted a value sent by the browser (the Host header) to decide what domain to put in that link. An attacker could change that value so the link pointed to their own site, and if you clicked it, your secret code would go to them, letting them reset your password.

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 mhmodgm54

View all

7 more disclosed reports, best first.

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.