Skip to content
Account takeover Write-up Intermediate

“The Hacker’s Rosetta Stone: Decoding HTTP to Unlock Critical

The password reset flow used the Host header to build the reset link, so an attacker could change it to their own domain and receive the victim's reset token. This allowed full account takeover.

Aman Sharma Follow

Published on amannsharmaa.medium.com

Every web hacker remembers the moment it clicked. For me, it wasn’t mastering a fancy tool or finding a zero-day.

Aman Sharma, on amannsharmaa.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

The application trusted the client-supplied Host header to generate the password reset URL without validating it.

Impact

An attacker could take over any account by stealing the password reset token, leading to full account takeover.

What the attacker needed

Victim initiates password reset; attacker can intercept request

How it was found

  1. Intercept the password reset request.
  2. Change the Host header to an attacker-controlled domain.
  3. Send the request and receive the reset email.
  4. Click the reset link, which points to the attacker's domain with the token.
  5. Use the token on the real site to reset 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 write-up has not been written yet. The Original tab links to the source.

When you forget your password, a website sends you a special link to reset it. This site built that link using a value called the Host header, which the visitor's browser sends and can be changed. By changing it, an attacker could make the link point to their own site and steal the reset token.

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 Aman Sharma

View all

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