Skip to content
Account takeover Write-up Intermediate

0-Click Account Takeover — Invite Friend + OTP Lifecycle Vu

The invite-signup flow trusted client-supplied email and OTP parameters in the invite URL and did not properly expire or rate-limit OTPs. An attacker could change the email parameter to a victim's address and verify or brute-force the OTP to complete signup and take over the account.

SaY_Mekky Follow

Published on medium.com

One of the most interesting areas in any web application is its account management functionality. Even small misconfigurations in these areas can lead to serious consequences.

SaY_Mekky, 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

Root cause

Likely the invite flow trusted client-supplied email and OTP values instead of binding a server-side invitation record to a signed token, and OTPs were neither single-use nor rate-limited.

Impact

An attacker could take over any account, including an admin account, without the victim clicking anything, though the text notes the reset-password flow itself was secure and only the invite flow was affected.

What the attacker needed

Attacker can send an invite; attacker can edit the invite URL; OTP is guessable or observable

The fix

The invite flow should bind invitations to a server-side record or signed token, make OTPs single-use and context-bound, and add robust rate-limiting on verification.

How it was found

  1. Send an invite to your own address and open the received invite link.
  2. Note the otp and email query parameters in the URL.
  3. Change the email parameter to a target (admin) address and resend the verification request.
  4. Brute-force or reuse the OTP against the verification endpoint until it is accepted.
  5. Complete the password-setting step, which updates the target account'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 invite someone, the site sends a link containing an email address and a one-time code. The site believed whatever email the link said, and the code could be guessed or reused. By swapping in someone else's email and finding the code, an attacker could finish signup as that person.

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 SaY_Mekky

View all

1 more disclosed report, 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.