Bypassing Email Verification Through an Incomplete Registration
The application marked an email address as verified after the OTP step, even if the registration was not completed. An attacker who knew a victim was mid-registration could start a new registration with the victim's email, skip verification, and create an account with a password they control.
medium.com
Published on medium.com
Cybersecurity
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.
Context
The target was an application with a multi-step account registration flow. Creating an account required three steps:
- Personal information: the user enters their first name, last name, email address and password, then clicks Next.
- Email verification: the application sends an OTP code to the provided email address, and the user must enter it to prove ownership of the address before proceeding.
- Additional information: the application asks for the user's country and some extra information, and the user clicks Complete to create the account.

The second step is the one that matters here: the OTP is the only proof that the person registering controls the email address being claimed.

The third step collects the remaining details and finalises the account.

Setup
No special tooling was involved. The researcher was simply walking through the registration flow in a browser, on Arch Linux, and observing how the application handled each step. The researcher could register an account, verify the email, and then register again with the same email address.
Finding it
The researcher completed the first two steps, including email verification, and reached the third step, where the flow asks for a phone number. While entering it, the browser was closed by accident with a keyboard shortcut.

The assumption was that the whole registration would have to be restarted, including a fresh OTP. So the browser was reopened and the same personal information was entered again: the same email address, password, first name and so on.
After clicking Next to finish the first step, the application did not ask for email verification again. It went straight to the third step.

To rule out a leftover browser session, the same process was repeated in an incognito window, with exactly the same result. The application was treating the email address as already verified even though the account creation had never been completed. That is the anomaly: verification of the address had been recorded as a standalone fact, decoupled from the account that was supposed to be created at the end of the flow.
Exploitation
The attack depends on an attacker who knows that a victim is registering with a particular email address. The scenario works as follows.
Step 1: the victim starts registering
The victim begins creating an account using their own email address.
Step 2: the victim verifies the email
The victim completes the first and second steps, successfully entering the OTP sent to their inbox.
Step 3: the attacker registers with the victim's address
Before the victim finishes the final step, the attacker starts a new registration using the victim's email address.
Step 4: verification is skipped
Because the application already considers that email address verified, the attacker is taken directly to the final step without having to provide the OTP. The attacker never sees the code and never has access to the victim's inbox.
Step 5: the attacker completes the registration
The attacker enters their own personal information and completes the registration using a password they control.

The account now exists under the victim's email address, but with credentials chosen by the attacker. When the victim later tries to finish their own registration, the application rejects the attempt because an account with that email address already exists. The attacker has effectively claimed the victim's email address during registration without ever controlling the mailbox.
Root cause
The problem lies in how the application tracked email verification state. After a user successfully entered the OTP, the server marked the email address as verified, even though the registration process had not been completed. Subsequent registration attempts using the same email address were therefore allowed to skip the verification step.
In other words, email verification and account creation were treated as two independent states, without protecting the transition between them. The verified state was not tied to the in-progress registration, so it outlived the flow that produced it and was reusable by anyone who started a new flow with the same address. The OTP was accepted, but its result was not tied to the registration that earned it.
Impact
An attacker who knows that a victim is mid-registration can take over the victim's email address as an account identifier, setting a password of their choosing. The victim is then locked out of registering with their own address, since the application refuses a second account for the same email.
The program accepted the report and awarded a reward.


It classified the vulnerability as Low severity, on the grounds that:
The attacker needs to meet specific conditions in order to be able to exploit this vulnerability.
That reasoning is fair: the attacker must know that the victim is registering and must act within the window between the victim's OTP verification and the completion of their registration. The report does not describe any way to widen that window or to detect a registration in progress automatically.

Fix
The report does not state what change, if any, the program made. The design fix implied by the root cause is to bind the verified state to the specific registration attempt rather than to the bare email address: the OTP result should be tied to the session or registration token that requested it, and a new registration for the same address should require a fresh OTP unless it is the same in-progress flow. Alternatively, the account record could be created at the moment the OTP is confirmed, so that a verified address always corresponds to an existing account and cannot be claimed by a later flow.
Variants to test
- Reuse of the verified flag across sessions. Verify an address in one browser, abandon the flow, then start again in a private window with the same address. A positive result is landing on the final step without a new OTP.
- Reuse after account deletion or reset. Verify an address, abandon registration, then have the address removed or the flow reset by the application. If a new registration still skips the OTP, the flag is not being cleared with the flow.
- Other flows keyed on the same state. Password reset, email change and invitation acceptance often share the same verification bookkeeping. A positive result is any of them accepting an address as verified because an unrelated registration verified it earlier.
- Timing the window. Register two accounts for the same address in quick succession from different clients, one completing the OTP and the other starting immediately after. If the second skips verification, the race is reproducible without knowing a victim in advance.
- Case and normalisation variants. Verify
[redacted], then register with a differently cased or otherwise normalised form of the same address. A positive result is the second attempt skipping the OTP, which would also show that the verified flag is stored against a normalised key.
What happened, in plain words
A security researcher was signing up for an account on a website, just to see how the sign-up worked. Signing up took three screens: your name, email and password; then a code sent to your email; then a few extra details like your country. Halfway through the last screen, the researcher accidentally closed the browser with a keyboard shortcut. Annoyed, they opened it again and started over with the same email address and password. This time the website skipped the email code step entirely and dropped them straight onto the last screen.
That is the bug. The website had written down "this email address is verified" as soon as the code was entered, and never removed that note when the sign-up was abandoned. Anyone who started a new sign-up with the same address was trusted as if they had proved they owned the mailbox. If an attacker knows that someone is halfway through signing up, the attacker can jump in, finish the sign-up first with a password of their own, and take the victim's email address as an account name. The victim is then locked out of registering with their own address.
The researcher reported it, the program accepted it and paid a reward, but rated it Low severity because the attacker has to know that the victim is registering and has to act inside a narrow window of time.
The sign-up flow, step by step
Before the bug makes sense, you need to know what the normal sign-up looked like. The application asked for three things in order.
- Personal information. You type your first name, last name, email address and a password, then click Next.

- Email verification. The application sends a one-time code (an OTP, short for one-time password) to the email address you typed. You have to read that code out of your inbox and type it into the site before you can continue.

- Additional information. The application asks for your country and a few extra details. When everything is filled in, you click Complete and the account is created.

Why the middle step exists
Anyone can type any email address into a form. Typing [redacted] proves nothing. The OTP is the proof: only the person who can open that mailbox can read the code and type it back. In everyday terms, it is like a bouncer who does not take your word that you live at an address, but posts a letter with a secret word inside and only lets you in once you read the word back to him.
So step two is the security-critical part of the whole flow. If it can be skipped, the site has no idea whether the person signing up really owns the address they claim.
Why the third step exists
The third step is just data collection: country and a few extra details. It is the last screen before the account is actually written into the database. That detail matters later, because the account does not exist until this step is finished.
How the researcher found it
No special tools were used. The researcher was clicking through the sign-up in an ordinary browser on Arch Linux (a Linux distribution) and watching what each screen did. Finding the bug required registering once, verifying the email, and then registering again with the same email address.
The researcher completed steps one and two, including the email code, and reached step three, where the form asks for a phone number. While typing it, the browser was closed by accident with a keyboard shortcut.

The natural assumption was that everything would have to be redone, including a brand new code sent to the inbox. So the browser was reopened and the same details were entered again: the same email address, the same password, the same first name.
After clicking Next to finish step one, the application did not ask for the email code again. It went straight to step three.

Ruling out the boring explanation
There is an obvious innocent explanation for this: maybe the browser still had something saved from the earlier attempt, like a logged-in session. A session is how a website remembers who you are between page loads. When you log in, the server gives your browser a small piece of data (usually stored in a cookie, a little labelled note the browser keeps and sends back with every request). The server looks at that note and says "ah, this is the person from a minute ago".
If the skip had been caused by a leftover session, then a fresh browser with no memory of the earlier attempt would behave normally. So the researcher repeated the whole process in an incognito window, a private browsing mode that starts with no cookies and no saved session. The result was exactly the same: the code step was skipped.
That ruled out the browser. The decision was being made on the server, and the server was treating the email address as already verified even though the account had never been created. That is the anomaly: the verification had been recorded as a standalone fact, separate from the account that was supposed to be created at the end of the flow.
The attack scenario
The bug only helps an attacker who knows that a particular person is signing up with a particular email address, and who acts inside a specific window of time. Here is how it plays out.
Step 1: the victim starts registering
The victim begins creating an account using their own email address.
Step 2: the victim verifies the email
The victim completes steps one and two, typing in the code that arrives in their inbox. At this moment the server writes down: this address is verified.
Step 3: the attacker registers with the victim's address
Before the victim finishes the final step, the attacker starts a new sign-up using the victim's email address.
Step 4: verification is skipped
Because the application already considers that address verified, the attacker is taken straight to the final step without any code. The attacker never sees the code and never has access to the victim's inbox. This is the heart of the bug: the proof of ownership was earned by one person and then reused by another.
Step 5: the attacker completes the registration
The attacker fills in their own details and finishes the sign-up with a password they chose.

The account now exists under the victim's email address, but with credentials chosen by the attacker. When the victim later tries to finish their own sign-up, the application refuses, because an account with that email address already exists. The attacker has effectively claimed the victim's email address during registration without ever controlling the mailbox.
Why this is a real problem even though it is narrow
Email addresses are often the identity a person uses everywhere: to log in, to reset passwords, to receive notifications. If an attacker can register an account under your address first, the account itself is the attacker's, and you cannot sign up again because the address is taken. The victim cannot simply sign up again, because the address is taken.
Root cause
The problem is in how the application tracked the state of email verification. After a user successfully entered the OTP, the server marked the email address as verified, even though the registration process had not been completed. Later sign-up attempts using the same address were therefore allowed to skip the verification step.
Put another way, email verification and account creation were treated as two independent states, with nothing protecting the transition between them. The verified state was not tied to a specific in-progress registration. So it outlived the flow that produced it, and it was reusable by anyone who started a new flow with the same address. The OTP was accepted, but its result was not tied to the registration that earned it.
A useful comparison: a hotel gives you a wristband when you check in, and the pool staff trust the wristband. That works because the wristband is tied to you and to your stay. Now imagine the hotel instead writes "this room number has paid" on a whiteboard by the pool. Anyone who says that room number gets in, even a stranger, and the note stays on the whiteboard after the guest leaves. The bug is the whiteboard: the fact was recorded against the room number (the email address) instead of against the guest (the specific registration).
Impact
An attacker who knows that a victim is mid-registration can take over the victim's email address as an account identifier and set a password of their choosing. The victim is then locked out of registering with their own address, since the application refuses a second account for the same email.
The program accepted the report and awarded a reward.


It classified the vulnerability as Low severity, on the grounds that:
The attacker needs to meet specific conditions in order to be able to exploit this vulnerability.
That reasoning is fair. The attacker must know that the victim is registering and must act within the window between the victim's OTP verification and the completion of their registration. The report does not describe any way to widen that window or to detect a registration in progress automatically.

Fix
The report does not state what change, if any, the program made. The design fix implied by the root cause is to bind the verified state to the specific registration attempt rather than to the bare email address. The OTP result should be tied to the session or registration token that requested it, and a new registration for the same address should require a fresh OTP unless it is the same in-progress flow. Alternatively, the account record could be created at the moment the OTP is confirmed, so that a verified address always corresponds to an existing account and cannot be claimed by a later flow.
In the hotel comparison: give the guest a wristband tied to their own booking, and throw it away when they leave, instead of writing the room number on a shared whiteboard.
Variants to test
If you want to look for the same class of bug on a site you are allowed to test, these are the variations worth trying. Each one asks the same question in a different way: does the "verified" note belong to the address, or to the specific sign-up that earned it?
- Reuse of the verified flag across sessions. Verify an address in one browser, abandon the flow, then start again in a private window with the same address. A positive result is landing on the final step without a new OTP.
- Reuse after account deletion or reset. Verify an address, abandon registration, then have the address removed or the flow reset by the application. If a new registration still skips the OTP, the flag is not being cleared with the flow.
- Other flows keyed on the same state. Password reset, email change and invitation acceptance often share the same verification bookkeeping. A positive result is any of them accepting an address as verified because an unrelated registration verified it earlier.
- Timing the window. Register two accounts for the same address in quick succession from different clients, one completing the OTP and the other starting immediately after. If the second skips verification, the race is reproducible without knowing a victim in advance.
- Case and normalisation variants. Verify
[redacted], then register with a differently cased or otherwise normalised form of the same address. A positive result is the second attempt skipping the OTP, which would also show that the verified flag is stored against a normalised key.
Glossary
- Account identifier: the value that uniquely names an account on a site, here the email address.
- Arch Linux: a Linux distribution, an operating system you can install on a computer.
- Attacker: the person trying to abuse a weakness in a system.
- Bug bounty program: a scheme where an organisation pays researchers for reporting security problems to it.
- Cookie: a small piece of data a website asks your browser to store and send back with later requests, often used to remember who you are.
- Credentials: the details used to log in, typically an email address or username plus a password.
- Email verification: the process of proving you can read messages sent to an email address, usually by typing back a code.
- Exploit: to actually use a weakness to achieve something, rather than just noticing it.
- Flag: a stored true/false marker in a system, here "this address is verified".
- Flow: a sequence of screens or steps a user goes through to complete a task, such as signing up.
- Incognito window: a private browsing window that starts with no cookies or saved session data.
- Low severity: a rating meaning the issue is real but hard or unlikely to exploit.
- Normalisation: converting different spellings of the same value into one standard form, for example lowercasing an email address.
- OTP (one-time password): a short code that is valid once, sent to your email or phone, used to prove you control that address or device.
- Password reset flow: the sequence for setting a new password when you have forgotten the old one, usually involving a code or link sent to your email.
- Race condition: a situation where the outcome depends on two actions happening in a particular order or at the same time.
- Registration token: a value that identifies one specific in-progress sign-up, so the server can tell one attempt apart from another.
- Root cause: the underlying reason a bug exists, as opposed to its visible symptom.
- Server: the computer that runs the website and makes decisions like whether an email is verified.
- Session: the server's memory of your ongoing interaction with the site, usually identified by a cookie.
- Severity: how serious a vulnerability is judged to be, often on a scale such as Low, Medium or High.
- State: information a system remembers about where something is in a process, for example "code sent" or "verified".
- Victim: the person whose account or email address an attacker is trying to take over.
- Vulnerability: a weakness in a system that can be used to make it behave in a way its designers did not intend.
- Window (attack window): the period of time during which an attack is possible, here between the victim's code entry and the completion of their sign-up.