Day 28: Account Takeover via Registration Flaw
The registration flow treated email addresses as case-sensitive and did not check for duplicates, so signing up again with a differently-cased version of an existing address created a new account for the same mailbox. Combined with OTPs that never expired and had no rate limiting, an attacker could register with a victim's email and take over the account.
medium.com
Published on medium.com
Today’s Account Takeover (ATO) vulnerability was discovered by Amr Kadry, a penetration tester and bug hunter recognized by over 45 companies. This bug was hiding in plain sight within the registration flow, allowing him to bypass email verification and take over accounts effortlessly.
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 compared and stored email addresses without normalising case and without a duplicate check, and its OTPs had neither expiry nor attempt limits.
Impact
An attacker could take over another user's account with no interaction from the victim, and the text also claims accounts could be created for non-existent company addresses.
What the attacker needed
Victim's email address known; no user interaction needed
The fix
The registration flow should normalise emails to lowercase before storing or comparing, block duplicate registrations, require email ownership confirmation before granting access, and give OTPs an expiry, attempt limits and single use.
How it was found
- Register a normal account with an email address.
- Sign up again with the same address but a different letter case.
- Observe the system does not treat it as a duplicate and prompts for a new OTP.
- Sign up using the victim's email with a case variation.
- Brute-force or reuse an old OTP because there is no expiry or rate limit.
- Log in as the victim.
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, a site usually sends a one-time code (OTP) to your email to prove the address is yours. This site compared email addresses exactly, so the same mailbox written with a capital letter counted as a brand-new user, and the codes never expired or limited attempts. That let someone sign up using a victim's address and get into the victim's account.
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.