Skip to content
Account takeover Write-up Beginner

BBP#3: The Boat Speaker— From Shopping Cart to Account Takeover

The checkout SDK returned a valid authentication token before the phone number's OTP was verified, and the OTP endpoint lacked rate limiting on a 4-digit code. An attacker could use the early token to read a user's saved addresses, or brute-force the OTP to take over any account.

raoshaab Follow

Published on raoshaab.medium.com

It was 2021. I was at home, sitting on my bed, trying to buy a new pair of Boat speakers.

Devender Rao, on raoshaab.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 Node SDK serialised the authentication response too early, including a valid JWT before OTP verification, and the OTP endpoint had no rate limiting.

Impact

An attacker could read any user's saved addresses using only a phone number, and could brute-force the 4-digit OTP to take over accounts and potentially place orders in the victim's name.

What the attacker needed

Victim's phone number; network visibility or ability to make requests; no account needed

The fix

The Node SDK was patched to stop returning the token before OTP verification; the OTP endpoint should also be rate-limited.

How it was found

  1. Enter a phone number on the checkout page and submit.
  2. Observe the response contains a valid auth_token even though OTP is still required.
  3. Use that token in the Authorization header to call the address API for that phone number.
  4. For the second bug, send repeated OTP guesses to the endpoint, which has no rate limiting.

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 log in with a phone number, the site should only give you a session token after you prove you own the number by entering a one-time code (OTP). Here, the token arrived before that check, so anyone who saw the response could act as the user. Separately, the site allowed unlimited guesses at a 4-digit code, so a script could try all 10,000 combinations and break in.

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.