How I was able to verify any contact number for my account?
The web application allowed a user to verify any phone number by manipulating the server's response to an incorrect OTP. An attacker could intercept the OTP verification response and change the status code to 204, tricking the client into believing verification succeeded.
Published on medium.com
{{media:0}}
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 client-side application trusted the HTTP response status code to determine OTP verification success, rather than the server enforcing verification on the backend.
Impact
An attacker could verify any phone number without possessing the OTP, potentially bypassing second-factor authentication if phone verification is used as a security measure.
What the attacker needed
A free account on the portal; ability to intercept HTTP responses
How it was found
- Register and log in to the portal.
- Add a phone number and request an OTP.
- Intercept the OTP verification response.
- Submit an incorrect OTP and observe the error response.
- Modify the response status code to 204.
- The phone number is verified without a valid OTP.
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 add a phone number, the app sends a one-time code (OTP) to prove you own it. The server checks the code and replies with a success or failure message. Here, the author found that by editing the failure reply to look like a success, the app accepted any phone number without the correct code.
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.