So… I Could Control the OTP ♂️
An email-change flow accepted a client-supplied parameter that set the number of OTP digits, and setting it to one made the server accept a single-digit code of all zeros. An attacker could pass the OTP step of the email-change process, but a verification link sent to the victim's email was still required to complete the change.
medium.com
Published on medium.com
This article is about how I discovered an OTP bypass vulnerability in a VDP on HackerOne
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 trusted a client-supplied parameter (mfaDigits) to decide the OTP length and generated a trivial all-zero code when the length was reduced.
Impact
The OTP check for email change could be bypassed, but this did not lead to account takeover because a verification link to the victim's email was still required.
What the attacker needed
Access to the email-change form; ability to intercept the resend request
How it was found
- Find a domain with an email-change feature that sends a six-digit OTP to the current email.
- Intercept the resend request and note the mfaDigits parameter.
- Change mfaDigits to 1 and observe that the accepted OTP becomes 000000.
- Submit 000000 and pass the OTP 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 change your email address on a website, the site often sends a short numeric code (a one-time password, or OTP) to your current email to prove it is you. Here the server let the browser tell it how many digits that code should have, and when told to use one digit it accepted a code of just zero. That let someone skip the code check, though the site still sent a separate confirmation link to the real owner's email before finishing the change.
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.