Skip to content
Account takeover Write-up Intermediate

A Journey into Unusual Header Injection

The password reset functionality on a test SSO site used the X-Forwarded-Host header to build the post-reset redirect URL, so an attacker could set that header to their own domain and cause the victim to be redirected there after changing their password. The author claims this could enable token theft and phishing, but the text does not demonstrate token theft.

imusabkhan Follow

Published on medium.com

Assalam Alaikum everyone! Welcome to another bug hunting write-up.

Mohammad Musab Khan, 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

What the attacker needed

Victim clicks the password reset link; attacker can set the X-Forwarded-Host header

How it was found

  1. Send a password reset request with a modified X-Forwarded-Host header pointing to an attacker-controlled domain.
  2. Receive the password reset email and open the reset link.
  3. Change the password on the reset page.
  4. Observe that the browser is redirected to the attacker-controlled domain.

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 reset a password, the site often sends an email with a special link. This site used a value from the request (the X-Forwarded-Host header) to decide where to send you after you changed your password. Because that value can be set by the person making the request, an attacker could make the site send the victim to the attacker's website instead of the real one.

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 imusabkhan

View all

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