Skip to content
Account takeover Disclosed report Beginner

Improper Session management can cause account takeover[https://micropurchase.18f.gov]

The session cookie for the site was not invalidated after logging out, so a stolen cookie could still be used to access the account. An attacker who obtained a user's cookie could reuse it to take over the account.

tikoo_sahil Follow

Originally disclosed on HackerOne

  • Triaged in 3 days
  • Fixed in 3 months
  • Disclosed after 23 months

Hello,

I would like to report a vulnerability on https://micropurchase.18f.gov where I am able to reuse session cookie of a test user account i accessed through Github. The problem is that the cookies stored on the browser are not getting expired after logging out from the platform and from Github as well.

Steps to Reproduce:

  1. visit https://micropurchase.18f.gov
  2. click on sign in through Github
  3. Once you are logged in Then Use "BurpSuite" or any other Utility to get the cookies of that session ( "EditThisCookie" Chrome Extension can be used and in a Case of an Attacker he can Use Any Sort Of cookie Stealing Script or Cookies Spoofing Utility to get his hands on cookies ) and grab the cookies of active User Session.

4.Then Logout of the Account from https://micropurchase.18f.gov . 5. Clear all Cookies related to https://micropurchase.18f.gov using [cookies manager+ extension]Then Inject Hijacked User Cookies so that you can get into the user session... 6. After the cookies been injected You will See That the main page showing account and logout parameters on the front end.

Attack Scenario :-- If The Attacker Got his Hands Upon Users Cookies he can Get Access To the User Account.An attacker can get the user session cookies by any means Session Spoofer, Cookie Stealer etc.As the user cookies are not expiring so an attacker can directly inject the stolen cookies of a victim in a request from browser and thus can have access to the victims account.

So expire the cookies once a user is logged out of the website. POC:- I am providing a video poc :- https://youtu.be/uLFJUJ3CnQQ , its unlisted video.

Regards sahil tikoo

The original report as published on HackerOne, by tikoo_sahil. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report 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 on logout, so the old session cookie remained valid.

Impact

An attacker who obtained a user's session cookie could reuse it after logout to access the victim's account.

What the attacker needed

Attacker obtains victim's session cookie; victim has logged in via GitHub

The fix

The server should invalidate the session on logout so that old cookies no longer work.

How it was found

  1. Visit the site and sign in through GitHub.
  2. Capture the session cookies using a browser extension or proxy.
  3. Log out of the site.
  4. Clear the site's cookies and then inject the captured cookies.
  5. Observe that the account page is shown, indicating the session is still active.

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 report has not been written yet. The Original tab links to the source.

When you log in, the site gives your browser a small piece of data called a session cookie, which acts like a temporary key. Normally, logging out should make that key useless. Here, the key kept working, so anyone who copied it could still get into 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 tikoo_sahil

View all

4 more disclosed reports, best first.

More from GSA Bounty

View all

The newest disclosed reports for this program.

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.