Broken Authentication and session management OWASP A2
The report claims that session cookies on HackerOne do not expire after logout, allowing an attacker who has copied the cookies to reuse them later to access the victim's account. The author demonstrates this by saving cookies, logging out, waiting several hours, and then re-importing the cookies to regain access.
Originally disclosed on HackerOne
- Triaged in 9 hours
- Fixed in 15 days
- Paid in 22 days
- Disclosed after 2 months
Description: Session management issue in https://www.hackerone.com
Cookies are used to maintain session of the particular user and they should expire once the user logs out of his hackerone account.In secure web application,Cookies immediately expire once the user logs out of his account.
But this is not happening in the case of hackerone same cookies can be used again and again to open the session of the victim. Extensions required and Browser Version: Google chrome Version 26.0.1410.64 m
Edit this cookie extension
Steps to reproduce the issue:
- Create a Hackerone account and log in into the newly created account or you can use your existing account as well.
- Copy the cookies using Edit this cookie extension when you are logged in using "Import Cookies" option of the extension.
- Now log out from your Hackerone account and save the cookies in the Notepad file.
- After 6 hrs or 8 hrs copy the same cookies in your Chrome using the same extension and you will be logged into your account.The cookies are not getting expired once the user logs out of his account.
Benefits :)
Suppose if a XSS vulnerability is exploited in the web application (there is not any ) the hacker can use same cookies again and again to open the session of the victim but what if there are new cookies when the victim logs out from his account on the other end the hacker session also expires.
Please have a look, Looking forward to hear from you. Best Regards, Anand Prakash https://www.twitter.com/sehacure
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 token on logout, so the same cookie remained valid.
Impact
An attacker who has obtained a victim's session cookies could reuse them after the victim logs out to access the account, but only if the attacker already has the cookies (e.g., via XSS, which the author notes is not present).
What the attacker needed
Attacker must obtain victim's cookies; victim must have logged in; attacker can reuse cookies later
The fix
The server should expire the session cookie on logout so the old cookie cannot be reused.
How it was found
- Create or use an existing HackerOne account and log in.
- Copy the session cookies using a browser extension.
- Log out of the account and save the copied cookies.
- Wait several hours, then re-import the same cookies into the browser.
- Observe that you are logged back into 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 report 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 small piece of data called a cookie to remember who you are. Normally, when you log out, that cookie should stop working so nobody else can use it. This report says that on HackerOne, the cookie kept working even after logout, so someone who copied it could log in as you later.
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.