Skip to content
Account takeover Write-up Intermediate

How a simple password reset led to a complete account takeover

The application did not invalidate existing authenticated sessions after a password reset, so an attacker with a previously active session could retain owner-level access. The attacker used this stale session to invite their own account and promote it to Owner, resulting in a full account takeover.

medium.com

Published on medium.com

While testing a SaaS application as part of a responsible security research program, I discovered a critical privilege escalation vulnerability caused by broken session management and improper authorization checks. What made this issue dangerous was not just the bug itself — but the fact that it persisted even after a…

Jimmy, 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 did not invalidate existing sessions after a password reset and did not require re-authentication for sensitive actions.

Impact

The attacker became a full Owner of the organisation, could manage billing, change the account email, remove the original owner and permanently lock the victim out, resulting in a complete and persistent account takeover.

What the attacker needed

Attacker has an active session; victim resets password; attacker can invite an email

The fix

The application should invalidate all existing sessions after a password reset and require re-authentication for sensitive actions such as changing team roles.

How it was found

  1. The attacker already had an authenticated session of the victim's account in one browser.
  2. The victim reset their password using the 'Forgot Password' flow.
  3. The attacker's old session remained valid and was used to access the Team Management section.
  4. The attacker invited their own email address as a new team member and accepted the invitation using a different account.
  5. Using the old owner-level session, the attacker edited team roles and promoted their newly added account to Owner.

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 log in, the server gives your browser a session token so it remembers you. If you change your password, the server should throw away all old tokens so anyone else logged in is kicked out. Here it did not, so an attacker who was already logged in stayed logged in and could make themselves the owner of the account.

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.

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.