Skip to content
Account takeover Write-up Intermediate

Bismillah Hir Rahman Nir Raheem

The password reset email contained a link whose host was taken from the Referer header, so an attacker could make the reset token point to a domain they control. A victim who used the poisoned link would send their reset token to the attacker, allowing account takeover.

Be nice insabat Follow

Published on infosecwriteups.com

How i found, reported and got the bounty of my first easy account take over on the reset password functionality

Be nice insabat, 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

Likely the reset-password link was built from the attacker-controllable Referer header instead of a fixed, trusted host.

Impact

A victim who opened the poisoned reset link could have their reset token sent to the attacker, leading to account takeover.

What the attacker needed

Victim requests a password reset; victim opens the poisoned link

How it was found

  1. Request a password reset and observe the emailed link format.
  2. Change the Host header to an attacker domain and request a reset; no poisoned email arrives.
  3. Change the Origin header to an attacker domain and request a reset; still no poisoned email.
  4. Restore the Origin header and change the Referer header to an attacker domain.
  5. Request a reset again and receive an email whose token link points to the attacker 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 forget your password, a site emails you a link with a secret token that lets you set a new one. This site built that link using a value the browser sends along with the request (the Referer header), which the sender can set to anything. By putting their own domain in that value, an attacker could get the secret token delivered to a link they control.

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 Be nice insabat

View all

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