Skip to content
Account takeover Write-up Beginner

Another (P4) Bug Report Got Accepted for (session) Vulnerability

The session cookie was not invalidated after logout, so an attacker who obtained the cookie could reuse it to log in as the user. The author notes that chaining this with a cookie-extraction method like XSS could lead to account takeover.

Sanjeev1 Follow

Published on medium.com

lets name the target as target.com. I choose the target and used my methodology i use like doing recon finding files and then i started checking out the functionalities the site had.

Sanjeev Rathore, 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 server did not invalidate the session token on logout, so the same cookie remained valid.

Impact

An attacker who obtains the session cookie could reuse it after the user logs out to access the account, and chaining this with a cookie-extraction method like XSS could lead to account takeover.

What the attacker needed

Attacker obtains the session cookie; victim logs out

The fix

The server should invalidate the session token on logout so the cookie can no longer be used.

How it was found

  1. Intercept the login and user profile requests using Burp Suite.
  2. Identify the cookie that keeps the login session alive.
  3. Copy the session cookie.
  4. Make a logout request.
  5. Paste the copied cookie into the browser's application tab in incognito mode.
  6. Observe that the cookie still logs you in directly to the account.

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, it gives your browser a small piece of data called a session cookie so it remembers you. Logging out should make that cookie useless. Here, the website did not invalidate the cookie on logout, so anyone who still had a copy of it could keep using it to access 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.

More by Sanjeev1

View all

1 more disclosed report, 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.