Skip to content
Account takeover Write-up Beginner

HOW I FOUND MY FIRST BUG

The password reset endpoint used a five-digit one-time code that was not rate-limited and remained valid after use, and previously issued codes also stayed valid. An attacker who obtained one valid code could reuse it to change the victim's password and take over the account.

irenevenunye55 Follow

Published on medium.com

I enjoy reading on medium a lot because it gives me a lot of ideas about bug hunting.

Single, 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 reset endpoint lacked rate limiting and did not invalidate one-time codes after use or after a new code was issued.

Impact

An attacker who obtains one valid code could change the victim's password at will and log in to the account.

What the attacker needed

Attacker obtains one valid OTP; victim's phone number known or guessed

How it was found

  1. Find the password reset endpoint and note it sends a five-digit code.
  2. Check whether the code appears in the response (it did not).
  3. Brute force the code field with a limited range around a known code.
  4. Observe that the correct code changes the password.
  5. Resend the same request with the correct code and see it succeed again.
  6. Brute force the full range and find other previously issued codes also work.

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 reset a password, the site sends a short numeric code to prove it is you. This site let someone try thousands of codes quickly and kept old codes working, so a single leaked code could be used again and again to change the password.

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.