How a Simple OTP Flaw Could Lead to Full Account Takeover
The registration OTP was sent in the server response, allowing an attacker to verify any email address without access to it. Combined with an IDOR in the invoice endpoint that exposed user emails, an attacker could take over accounts and use their wallets.
medium.com
Published on medium.com
I am blackmambaa001 a security researcher/Hungry learner and bug bounty hunter with a strong interest in web application security, especially authentication and session management flaws.
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 OTP was included in the registration response instead of only being sent to the user's email, and the invoice endpoint lacked an ownership check.
Impact
An attacker could take over user accounts and use their wallets to make purchases, and potentially access admin dashboards and manipulate prices.
What the attacker needed
A free account; ability to intercept HTTP traffic
How it was found
- Go to the registration section and intercept the email verification request.
- Observe that the OTP code is included in the response.
- Complete registration and create a profile.
- Make a small payment and note the invoice URL with an order_id parameter.
- Change the order_id to other values to view other users' invoices and emails.
- Use the exposed emails with the OTP flaw to take over accounts and access their wallets.
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 (OTP) to your email to prove it is yours. Here, the site also put that code in the response it sent back to the browser, so anyone could read it and confirm any email address without owning it. Separately, invoice pages could be viewed by changing the order number in the link, which showed other users' email addresses.
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.