Skip to content
Account takeover Write-up Beginner

The Auth Apocalypse: Broken Authentication & Session Management E

The session ID in the cookie did not change before and after login, so an attacker who set a fixed session ID could use it after the victim logged in to access the victim's account. The author confirmed this by using the same fixed ID in another browser and gaining logged-in access.

Yamini Yadav_369 Follow

Published on infosecwriteups.com

I’m Yamini Yadav, a Security Engineer and your caring writer. As you know, I just wrapped up my last series,The Injection Chronicles, and today, I’m thrilled to launch a new one:The Auth Apocalypse: Broken Authentication & Session Management Explored.

Yamini Yadav_369, 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

The application did not regenerate the session ID after authentication, so a pre-login session ID became an authenticated session.

Impact

An attacker who knows a pre-login session ID could take over the account, make unauthorised purchases or changes, expose sensitive data, and possibly escalate privileges if the account is an admin.

What the attacker needed

Attacker can set or know a pre-login session ID; victim logs in using that session ID; victim clicks a crafted link or is tricked

The fix

The session ID should be regenerated after login, cookie flags such as HttpOnly, Secure and SameSite should be set, session IDs should not be accepted via URL, sessions should expire, and old sessions should be invalidated on logout or login elsewhere.

How it was found

  1. Start with an anonymous session and note the session cookie.
  2. Log in with the test account.
  3. Check whether the session ID changes after login.
  4. Try using that same session ID in another browser.
  5. If the other browser gets logged-in access, session fixation is confirmed.

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 session ID, like a temporary name tag, so it knows who you are on later requests. Session fixation happens when that name tag is not replaced at login: an attacker can give you their name tag before you log in, and after you log in the site still treats that same name tag as you. The attacker then uses the name tag they already know to act as you.

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 Yamini Yadav_369

View all

13 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.