Skip to content
Account takeover Write-up Intermediate

1 Click Ato Via Host Header Injection Exploiting Password Reset Poisoning

The application built password reset links using the client-supplied Host header, so an attacker could make the reset email point to their own server. When the victim clicked the link, the valid reset token was sent to the attacker, who could then reuse it to set a new password and take over the account.

kjulius Follow

Published on infosecwriteups.com

During a recent bug bounty engagement, I discovered a Host Header Injection vulnerability that, at first glance, looked fairly ordinary. However, after following the application’s password reset workflow from beginning to end, I realized it could be turned into a 1-Click Account Takeover (ATO).

kjulius, on infosecwriteups.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

The application constructed absolute password reset URLs using a client-controlled Host header instead of a trusted server-side hostname.

Impact

An attacker could take over a victim's account with one click, but the report was marked out of scope because the program excludes email hyperlink injection.

What the attacker needed

Victim clicks a link; attacker controls a domain; password reset feature enabled

The fix

The application should build password reset URLs from a server-side configured canonical hostname and reject unexpected Host headers.

How it was found

  1. Request a password reset for the victim.
  2. Replace the Host header with an attacker-controlled domain.
  3. The application generates a poisoned password reset email.
  4. The victim clicks the email link.
  5. The password reset token is sent to the attacker's server.
  6. The attacker reuses the token on the legitimate password reset endpoint 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 (the Host header), so an attacker could change it to their own web address. The victim then clicked the link, which sent the secret reset code to the attacker, who used it to change the password and log in as the victim.

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 kjulius

View all

11 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.