Skip to content
Account takeover Write-up Intermediate

When Changing an Email Isn’t Enough: Discovering a Persistent Account Takeover and Session Leakage…

The application leaked a session ID when changing an email and failed to invalidate the old session, allowing an attacker to inject the leaked session ID into a login request and gain persistent account access. The original Google SSO identity remained linked, enabling continued access even after the email change.

zyadatef2462003 Follow

Published on medium.com

As a bug bounty hunter and web security researcher, I always pay close attention to account management features. While many researchers focus primarily on authentication endpoints, sensitive account settings often reveal equally interesting security issues.

Zyadatef, on medium.com

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 application failed to invalidate old sessions after a sensitive email change and leaked the session ID in the response, while also not re-evaluating the OAuth identity binding.

Impact

An attacker could maintain indefinite, invisible access to the victim's account, and traditional remediation like a password reset would fail to evict the attacker.

What the attacker needed

Attacker controls initial registration; victim's email is changed to attacker's target; attacker can intercept HTTP traffic

How it was found

  1. Register a new account using Google SSO with the original email.
  2. Navigate to Account Settings and update the email to a different address.
  3. Intercept the HTTP response of the email change request and observe the leaked session ID.
  4. Open a separate unauthenticated browser session and attempt a standard login using the old email; the server returns an error that the account does not exist.
  5. Intercept the login request and manually inject the leaked session ID into the request.
  6. The application authenticates the session, confirming the old session remained active.

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 on a website, the site should log you out everywhere and give you a new session. Here, the site gave out a secret session ID in the response and kept the old session working. An attacker who saw that ID could use it to log in as the victim, even after the email was changed.

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.

More by zyadatef2462003

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.