Skip to content
Account takeover Write-up Intermediate

How ? My Knowledge about Server- (Nginx) Got Me into WHO’s Hal

The password reset functionality on a WHO subdomain trusted the X-Forwarded-Host header, allowing an attacker to poison the reset link so that the reset token was sent to an attacker-controlled domain. This enabled full account takeover by stealing the token and resetting the victim's password.

Phantom 🇮🇳 Follow

Published on osintteam.blog

The original lives on osintteam.blog

We do not hold its text, 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 Nginx reverse proxy was misconfigured to trust the X-Forwarded-Host header without validation, allowing an attacker to override the host used in password reset links.

Impact

An attacker could steal password reset tokens and take over user accounts, including admin accounts, within minutes.

What the attacker needed

A free account on the subdomain; victim triggers password reset; attacker controls a domain

How it was found

  1. Create an account on the subdomain and trigger a password reset request.
  2. Capture the password reset request.
  3. Inject an X-Forwarded-Host header with an attacker-controlled domain into the request.
  4. Observe that the reset link in the email points to the attacker's domain.
  5. Receive the reset token on the attacker's server via a pingback.
  6. Use the 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 forget your password, a website emails you a special link to reset it. This site built that link using a value the attacker could control, so the email contained a link to the attacker's site instead. Clicking it sent the secret reset code to the attacker, who could then change the victim's 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.

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.