Skip to content
Account takeover Write-up Beginner

Full account takeover through referral code

A referral code parameter in a signup request caused the application to treat an existing account as new, logging the attacker into that account without authentication. An attacker could take over any account, including employee accounts with large payouts, by submitting a signup with a victim's email and a referral code.

Mostafa Mamdoh Follow

Published on hector0x.medium.com

Bounty$700 View original

Mostafa Mamdoh

Mostafa Mamdoh, on hector0x.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

Likely the application used the presence of a referral code as a signal that the account was new, bypassing the normal authentication check for existing accounts.

Impact

An attacker could take over any existing account, including employee accounts with large payouts, by knowing the victim's email address and using a referral code.

What the attacker needed

Knowledge of victim's email address; a referral code from the site

How it was found

  1. Find the ambassadors subdomain and sign up for an account.
  2. Copy the referral/sharing URL from the account page.
  3. Open a private window and go to the referral URL to see the signup page.
  4. Enter an email address belonging to the target domain and click sign up.
  5. Observe being logged into the existing account without authentication.

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 sign up on a website, the site usually checks if your email is already registered and asks you to log in instead. Here, the site used a special code from a referral link to decide you were a new user, so it skipped that check and logged you straight into the existing account. This meant anyone could access someone else's account just by knowing their email and using a referral link.

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 Mostafa Mamdoh

View all

4 more disclosed reports, best first.

More from Shipt

View all

The newest disclosed reports for this program.

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.