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.
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.
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
- Intercept the login and user profile requests using Burp Suite.
- Identify the cookie that keeps the login session alive.
- Copy the session cookie.
- Make a logout request.
- Paste the copied cookie into the browser's application tab in incognito mode.
- 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.