Skip to content
Account takeover Write-up Intermediate

When Session Fixation Meets Session Confusion: A Case of Cross-User Control

The application did not issue a new session identifier on login and did not bind a session to a particular user, so a session cookie copied from one browser continued to work in another. After the original user logged out and a different user logged in on the first browser, refreshing the second browser showed the second user's account without any login.

infosecwriteups.com

Published on infosecwriteups.com

In this post, I’ll share a real-world (very fresh) vulnerability involving improper session management, leading to cross-user session takeover. This bug was rejected by a bug bounty program — not because it was invalid, but because they didn’t understand the risk.

Erkan Kavas, on infosecwriteups.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 server reused the existing session identifier across logout and a subsequent login by a different user, and never bound the session to the authenticated user, so the old cookie silently adopted the new user's identity.

Impact

Anyone who obtains a session cookie could take over whichever account later logs in on that session, including access to a financial dashboard, though the report gives no detail on how a cookie would be obtained in practice.

What the attacker needed

Possession of a valid session cookie; victim logs in on the same session afterwards

The fix

The application should generate a new session identifier on every login and bind the session to the authenticated user, invalidating the old one on logout.

How it was found

  1. Log in as User A in one browser and copy the session cookie.
  2. Inject that same cookie into a second browser or device, which is then also logged in as User A.
  3. In the first browser, log out User A and log in as User B.
  4. Refresh the second browser, which now shows User B's account without any login.

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.

A session cookie is a small token a website gives your browser after you log in so it remembers who you are. Normally the site should throw that token away and give you a fresh one each time someone logs in, and tie it to that one person. Here it kept the same token and let it point at whoever logged in last, so anyone holding a copy of the token could end up inside another person's 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.