Skip to content
Account takeover Write-up Beginner

Authentication Bypass Vulnerability :)

The application did not invalidate previously issued email verification codes when new ones were generated, so an old code remained valid beyond its stated 10-minute lifetime. An attacker who obtained an earlier code could still use it to log in after requesting new codes.

aman0 Follow

Published on aman0.medium.com

The original lives on aman0.medium.com

We do not hold its text, 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 did not mark previously issued verification codes as expired or invalid when generating a new code.

Impact

An attacker who obtained an earlier verification code could still use it to log in after new codes were issued, potentially bypassing the intended expiry.

What the attacker needed

Access to an earlier verification code; ability to request multiple codes

The fix

The application should invalidate all previously issued verification codes when a new code is generated.

How it was found

  1. Attempt to log in by entering an email address.
  2. Request multiple verification codes in quick succession.
  3. Wait for 10 minutes to let the first issued code expire.
  4. Attempt to log in using the first issued code.
  5. Observe that login is successful despite multiple subsequent codes being issued.

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 an email, the app sends a short number (a verification code) to prove it's you. This report found that if you ask for several codes, the older ones still work even after they should have expired, so someone who saw an old code could still use it.

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 aman0

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.