Skip to content
Account takeover Write-up Beginner

Broken Authentication

After a user changed their password, existing sessions and refresh tokens remained valid, so an attacker who had already stolen a token stayed logged in. The attacker could keep reading the victim's sensitive data even after the victim believed the account was secured.

medium.com

Published on medium.com

I m a Bug Bounty Hunter and Security Researcher. I specialize in finding the hidden gaps in web applications that automated tools usually miss, turning “normal” features into high-impact security findings.

CryVoid_01, 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 used stateless tokens and did not revoke existing access or refresh tokens when the password changed.

Impact

An attacker with a stolen token could keep accessing the victim's account after a password change, because neither the access token nor the refresh token was revoked.

What the attacker needed

Attacker has stolen a valid token; victim changes password

The fix

The application should revoke all existing sessions and refresh tokens when a password is changed, for example by tracking token versions or providing a logout-all-devices option.

How it was found

  1. Log in as the victim in one browser and open the dashboard.
  2. Log in as the same user in a second browser to simulate a hijacked session.
  3. Change the password in the first browser.
  4. Refresh the profile page or request the user endpoint in the second browser.
  5. Observe that the second browser remains authenticated and still receives sensitive data.

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 site gives your browser a token, like a temporary pass, and trusts that pass until it expires. If someone steals that pass and you change your password, the site should cancel the old pass. Here it did not, so the thief kept getting in.

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.