Bypassing OTP Verification via Response Manipulation: A Silent Threat
The OTP verification endpoint returned a JSON field indicating success or failure, and the client-side application relied solely on that field to decide whether verification passed. An attacker could intercept the server's failure response, change the success flag to true, and the application would grant access to the next registration step despite an invalid OTP.
Published on frostyxsec.medium.com
OTP (One-Time Password) is a common layer of security used in modern authentication systems. From banking apps to e-commerce platforms, OTPs are assumed to be a reliable mechanism to verify a user’s identity.
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
The application trusted a client-side success flag from the server response instead of enforcing OTP validation on the backend.
Impact
An attacker could bypass OTP verification and gain access to the next step of registration without a valid OTP.
What the attacker needed
Ability to intercept and modify HTTP responses
The fix
OTP validation should be enforced on the backend, with the verification status stored server-side and never relying on client-side flags.
How it was found
- Intercept the OTP validation request and its response.
- Change the is_success field in the response from false to true.
- Forward the modified response to the browser.
- Observe that the application accepts the invalid OTP and grants access to the next registration step.
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 enter a one-time password (OTP), the server checks it and sends back a message saying whether it was correct. This application trusted that message completely on the user's side, so someone could edit the message before it reached the browser and make it say 'correct' even when the OTP was wrong. That let them skip the OTP check and continue the registration process.
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.