The legitimate account owner reset their password. The password changed. The account was recovered. But the session created by the person who registered first was still active.
That was the outcome of an authentication-flow investigation that began with a much simpler question: what is the difference between signing in with an email address and signing in directly with Google?
The test demonstrated an account pre-hijacking chain in which an attacker-created session survived password recovery, could still read data the owner entered after recovery, could still modify the account, and could reach its billing and invoice areas. The proof of concept used two isolated browser sessions and an email inbox under my control; no real user’s account or inbox was involved.
How the investigation started
When I test a web application’s authentication system, I don’t look at registration, login and recovery as separate checkboxes. I compare the paths and try to understand how the application decides that two sign-in attempts belong to the same identity.
This application offered two routes: an email-and-password flow and Continue with Google. I wasn’t specifically searching for a pre-account takeover. I was mapping how those routes interacted.
The first unexpected behavior came from the email-based registration flow. I supplied an email address, set a password, and obtained access to an account without first proving ownership of the inbox. The account displayed an unverified-email state, yet it already allowed profile information, including first and last name, to be saved.

An unverified email on its own does not prove account takeover. The interesting question was what the application would do when the actual owner of that email tried the other sign-in route.
When the same email was used with Google
In a separate browser, I authenticated through Google using the same email address. Rather than letting the Google route establish a new account, the application recognized the existing account and directed the user back to the original sign-in method.
That distinction matters. The existing account had been created without verifying who owned the email address. In a real pre-hijacking scenario, the person who registered first would have chosen its password; the legitimate email owner would not know it.
This was not a Google authentication bypass. The unexpected behavior was the occupation of one email identity across two authentication paths, and what happened next when the rightful owner recovered access.
Reproducing the full chain
I used two isolated browsers to simulate two roles. The attacker session represented someone who had registered first using an email address they did not control. The victim session represented the legitimate owner of that address. For the test, I controlled the inbox used to simulate the victim.
Step 1 — Register first, keep the session
I created the account with the test email and a password chosen for the test. Email verification was not required before I could enter the account or save basic profile details. I kept that authenticated session open.
No action in this step.
Step 2 — The email owner arrives
Still signed in. Nothing has happened to this session yet.
I tried Continue with Google using the same email address. The application saw that the address was already associated with the password-based account, so the user was sent back to the original sign-in method.
The legitimate owner would not know the password the first registrant had chosen. The natural recovery route was Forgot password.
Step 3 — Recover through the inbox
Still open. I had not used the new password here, and I had not authenticated here again.
I requested a password reset. A verification code was sent to the test inbox that represented the legitimate owner. I entered the code, set a new password, recovered the account and completed the profile with my own first and last name.

Step 4 — Test the old session instead of assuming it was revoked
A page that is still visible after a password reset could simply be cached, so I reloaded it. The reload succeeded and returned fresh data: the first and last name the legitimate owner had entered after recovering the account. The “email not confirmed” warning was gone as well.

Reading was not the end of it. From the same session, I opened the profile editor and changed the first and last name.
I refreshed the page. The values written by the old session appeared here too: one account, two active sessions.

The impact went beyond the profile
After confirming that the old session could still read and modify the profile, I checked what else the same account exposed.
The two browsers were not two separate accounts that had been merged. They were two active sessions on one account. Changes made from either side appeared in the other, and the pre-recovery session kept access to whatever the recovered account accumulated afterwards.
The account area included addresses, payment data, subscriptions and invoices. The billing section stored a billing address, and the invoice list offered PDF and XML downloads. Both sessions could reach these records. Invoices typically contain a billing address, customer details and transaction information, so the risk was not limited to a changed display name: it was continued access to sensitive records as the legitimate owner used the account.

What made the chain work?
Two observable conditions were necessary:
- Unverified email registration established a usable account session. The application let someone occupy an email identity before establishing control of the inbox. A later Google sign-in with that address ran into the account that already existed.
- Password recovery did not revoke the existing authenticated session. The legitimate owner proved control of the inbox and replaced the password, but the old session kept its authorization to read and modify account data.
This is best described as an account pre-hijacking / unexpired session attack, closely matching the Unexpired Session Identifier attack described by Avinash Sudhodanan and Andrew Paverd in their 2022 research. It is not proof of a Google OAuth bypass, nor an insecure merge of two distinct user accounts.
Because I assessed the application from the outside, I am describing observed behavior, not claiming to know its server-side implementation. The failure could involve how session validity is stored, checked or revoked; the proof of concept does not reveal which internal component is responsible.
Security impact
The key failure was that successful account recovery did not restore exclusive control. An attacker who registered first could keep an authenticated session that still had access after the legitimate owner reset the password.
The observed consequences:
- Surviving authenticated access after the password reset, without knowing the new password.
- Read access to post-recovery data, shown by the old session displaying the name the owner set after recovery.
- Account modification, shown by editing the profile from the old session and seeing the change in both browsers.
- Exposure of billing and invoice areas available to the account, including stored addresses, subscription records and downloadable invoices.
Depending on the sensitivity of the data and what a surviving session can do, this class of issue can have high to critical impact. Here the impact was established through account-level access, a successful read of post-recovery data, a successful write, and visibility of sensitive billing surfaces — not through any assumed ability to move money or control an external payment method.
One limit is worth stating: the test confirmed that the old session remained active after recovery; it did not measure how long that session would keep working under every condition. No claim of indefinite validity is needed to establish the risk.
How to prevent this class of failure
The defensive lesson is about the whole account lifecycle, not a single login button.
- Verify control of the email address before treating it as a trusted identity. Limit what an unverified account can reserve, access or change, especially when other sign-in methods use the same address.
- Revoke existing sessions after account recovery. A password reset must not leave previously established sessions with access to the recovered account. Invalidate session identifiers and refresh tokens server-side, and offer the owner a clear “sign out everywhere”.
- Define how password-based and federated identities interact. A matching email string alone should not establish ownership or trust. Do not treat an unverified local account and a verified federated login as equivalent.
- Require fresh authentication for sensitive functions. Billing profiles, payment details, invoice downloads and identity changes deserve step-up checks appropriate to their sensitivity.
- Test the recovery boundary with two independent sessions. A successful reset in one browser is not proof that other browsers lost their access.
These recommendations align with the account pre-hijacking research and OWASP’s password-recovery guidance.
Final thoughts
I began by comparing two authentication routes, not by hunting for an account takeover.
The unverified registration was the first clue. The way Google sign-in ran into the existing account made it worth following. The password reset supplied the critical test. And the surviving session — still able to read and change the recovered account — turned an unusual registration flow into a meaningful security finding.
The password changed. The owner regained access. The original session did not lose it.
Authentication security is not only about whether a user can log in or reset a password. It is about whether the system correctly transfers — and revokes — trust when an account changes hands.
