Skip to content
Account takeover Write-up Intermediate

How I found an account take over by session fixation (Bugbounty)

The application accepted a session identifier supplied in a URL parameter and reused it as the user's session cookie after login, so an attacker could fix a known session ID and later access the victim's account. An attacker could send a crafted link to a victim, and once the victim logged in through it, the attacker could visit the same link to reach the victim's profile.

medium.com

Published on medium.com

Session fixation is a type of vulnerability that occurs when an attacker is able to set or fix a user’s session ID before the user logs in to a web application.

Leonardo, 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 accepted a session identifier from a URL parameter and reused it as the authenticated session instead of generating a fresh session ID after login.

Impact

An attacker could take over a victim's account if the victim logged in through a crafted link containing the attacker's session ID.

What the attacker needed

Attacker has an account; victim clicks a crafted link; victim logs in through that link

How it was found

  1. Log in to the site with your own account and note the JSESSIONID cookie value.
  2. Open the login URL with the SID parameter set to that same JSESSIONID in another browser.
  3. Log in as the victim account through that URL.
  4. Return to the first browser and open the same URL; it redirects to the victim's profile without asking for credentials.

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 to a website, the site gives your browser a temporary ID (a session ID) so it can remember who you are on later requests. Session fixation happens when a site lets someone else choose that ID in advance: the attacker picks an ID, tricks the victim into logging in with it, and then the attacker's own browser is treated as the victim. Here the site took the ID from a link parameter and kept using it after login.

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.