Results at a glance
Case flow
- 01Capture dependent requests
Identify validation and state-changing operations that should be atomic.
- 02Stage a parallel burst
Send both operations within the same processing window.
- 03Observe state misalignment
A valid check is applied to a newly changed identity record.
- 04Bind and serialize
Defenders should bind tokens to immutable values and commit transitions atomically.
Email verification serves as a fundamental security boundary. By ensuring an account is tied to a verified identity, applications protect sensitive functions like user invitations, data sharing, and organization management from malicious spoofing.
During audits of two different target applications, I discovered that this core trust assumption can be completely broken using Race Conditions. By forcing the applications to handle state transitions concurrently, I successfully bypassed email confirmation mechanisms in two unique ways.
Method 1: Bypassing the Invitation Restriction via Concurrent State Change
The Logic
The first target allowed users to sign up without immediate email verification. However, to invite external users to an organization, verification became mandatory. Furthermore, to prevent attackers from using fake identities, the application blocked users from changing their email address while an active invitation was pending.
The security state machine looked like this:
Is the current email verified? If yes, allow the invitation to send.
Lock the email address from being modified until the invite is resolved.
By exploiting a race condition, I aimed to slip a new, unverified email address into the system exactly as the invitation process validated the old, verified one.
The Exploitation
Using Burp Suite, I captured two distinct requests from a pre-verified attacker account:
Request A: Send an invitation to a target victim.
Request B: Change the account's email address to a fake, unverified domain (
[email protected]).
I staged Request A once and duplicated Request B multiple times into a single Burp Suite Request Group. Using Parallel Burst execution, I fired them simultaneously.
[Attacker Sends Parallel Burst]
│
┌───────────┴───────────┐
▼ ▼
[Req A: Send Invite] [Req B: Change Email]
│ │
├───────────────────────┤ <-- Race Window
▼ ▼
(Checks: Email Verified?) (Overwrites Profile Email)
│ │
▼ ▼
[Invite Dispatched] [Profile Updated]The Result
The server processed the requests within the same microsecond window. The application successfully validated that the account was verified when Request A initiated, but before the application locked the email field, Request B overwrote the profile data. The victim received an invitation originating from an unverified, entirely fabricated email address.
Method 2: Token Misalignment via Concurrent Confirmation Manipulation
The Logic
The second target utilized a standard email migration flow: when a user updates their email, the platform generates a unique token sent to the new inbox. Clicking that link fires a confirmation request to finalize the change.
The vulnerability existed because the backend verified the token's validity independently of checking whether the user had initiated a secondary email change request at the exact same moment.
The Exploitation
Prepare a Legitimate Token: I updated my verified account email to a second email address that I controlled (
[email protected]). The system dispatched a valid verification token to my inbox.Intercept the Confirmation: I captured the confirmation request containing the valid token in Burp Suite, but did not execute it yet.
Stage the Spoof: I went back to the profile settings and prepared a standard email change request, but this time inputted a target or spoofed address (
[email protected]).Execute the Race: I grouped the Email Confirm request (holding the token for the owned email) and the Email Change request (targeting the fake email) together and executed them concurrently in parallel.
// Grouped Request 1: Change to Fake Email
POST /email/change HTTP/1.1
Host: app.target.com
...
[email protected]&pass=mypassword
// Grouped Request 2: Confirm via Legitimate Token
POST /email/confirm?token=[VALID_TOKEN_FOR_YOURNEXTEMAIL] HTTP/1.1
Host: app.target.comThe Result
Because the requests were executed simultaneously, a classic Time-of-Check to Time-of-Use (TOCTOU) bug occurred. The application processed the email change to [email protected] right as the confirmation routine checked the database. The token validator confirmed the token was valid, but applied the "verified" state to the newly modified active record ([email protected]).
As a result, the account was instantly bound and verified to an email address I had no actual ownership of.
Summary of Impact
Both findings demonstrate that relying on step-by-step linear logic on the backend is inherently dangerous if requests are handled asynchronously. By abusing these race windows, an attacker can:
Spoof corporate identities to execute high-credibility internal phishing.
Hijack accounts or register under domain spaces they do not control.
Completely circumvent business logic designed to enforce identity verification.
For more write-ups on logical flaws and race condition techniques, follow me on Twitter: @siratsami71.
Need this level of testing across your attack surface?
Work directly with researchers who look beyond automated findings and test the assumptions attackers exploit.
Discuss a security assessment
