Skip to content
Access control Write-up Beginner

Forget Me Not: How Broken Logout Functionality Let Me Ride Sessions Forever

The logout endpoint returned a success message but never invalidated the session on the server, so a copied session cookie kept working after logout and across new logins. An attacker holding a stolen cookie could keep using the account, including a moderator account, and reach dashboards with logs, personal data and impersonation features.

infosecwriteups.com

Published on infosecwriteups.com

Free Link 🎈

Iski, 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 logout handler only returned a success message and never revoked or expired the session server-side, and new logins did not invalidate older sessions either.

Impact

A stolen or copied session cookie could be reused after logout and across devices, giving continued access to user and moderator areas with logs, personal data and impersonation features.

What the attacker needed

A valid session cookie; ability to log in to the target

The fix

The logout endpoint should invalidate the session server-side and new logins should revoke older sessions; the text does not say whether this was fixed.

How it was found

  1. Log in with a low-privilege test account and copy the session cookie.
  2. Trigger logout and note that the server still returns a success message.
  3. Paste the copied cookie into a new incognito tab and confirm access is still granted.
  4. Repeat with a moderator account and request the moderator dashboard using the old cookie.

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, the site gives your browser a session cookie, a short code that proves who you are on each request. Logging out should tell the server to forget that code, but here the server never did, so anyone who copied the cookie could keep using the account as if the person never left.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.