Otp Bypass And Account Takeover Using Response Manipulation
The sign-up flow returned the one-time verification code in the server response, so an attacker could create a fully activated account without access to the email inbox. Separately, account settings requests accepted user and admin identifiers from the client, and because those identifiers were sequential, an attacker could change another user's email and take over their account.
Published on infosecwriteups.com
Hey guyz, It's my first bug bounty (which means the first one which I am getting paid for the bug).
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 server included the OTP in the confirm-OTP response and trusted client-supplied user and admin identifiers in account settings instead of deriving them from the session.
Impact
An attacker could create accounts without email verification and, by guessing sequential identifiers, change another user's email and settings, which the author describes as full account takeover and access to exam data.
What the attacker needed
No email inbox needed for sign-up; ability to intercept HTTP requests; target account exists
How it was found
- Start creating an account with any email address and a password.
- Complete the next part of the form with interception on and submit it.
- Read the verification code from the response to that request.
- Enter that code on the OTP screen and finish sign-up.
- With the attacker account, open account settings and intercept the request that changes the email.
- Replace the user and admin identifiers with the target's sequential values and forward the request.
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, the site sends a one-time code to your email to prove the address is yours. Here the site also put that same code in the reply it sent back to the browser, so anyone could read it and finish sign-up without owning the email. In the second bug, the settings page trusted a user number sent by the browser; because numbers were handed out in order, changing the number let an attacker edit someone else'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.