Session Doesn't expire after 2fa and also other session can change passsword
When 2FA was enabled in one browser, another logged-in session stayed valid and could change the password without a 2FA code.
Originally disclosed on HackerOne
- Triaged in 3 days
- Fixed in 3 days
- Paid in 3 days
- Disclosed after 4 months
Summary:
Hi team, I found one issue related to your 2FA system on https://sidefx.com
Steps To Reproduce:
Login to the Same account in 2 different browser Now on 1st browser go to https://sidefx.com/profile and complete the all steps of 2fa and Enable it | 2FA activated Now go to another session or 2nd browser and reload the page. The account doesn't logout session is still alive. and now change the password on 2nd browser (which doesn't have 2fa enabled) BOOM!
Impact
In this scenario when 2FA is activated the other sessions of the account are not invalidated. 2FA is required to login. I believe the expected and recommended behavior here is to terminate the other sessions> request a new login> request the 2FA code> so then give the account access again
Attachments
What the report shows
The target is the SideFX website at https://sidefx.com, and the feature under test is its two-factor authentication (2FA) system together with the account profile page at https://sidefx.com/profile. The researcher reported the issue to the SideFX program on HackerOne.
The researcher's reproduction is short and relies on two concurrent sessions for the same account:
- Log in to the same account in two different browsers.
- In the first browser, go to
https://sidefx.com/profileand complete all the steps to enable 2FA. The report marks this state as "2FA activated". - In the second browser (the other session), reload the page. The account is not logged out and the session is still alive.
- In that second browser, which never passed a 2FA challenge, change the password. The report ends this step with "BOOM!".
The researcher attached a single screen recording of the flow:
The report does not include any HTTP requests, parameters, headers or server responses, so the exact endpoints behind the profile page and the password change are not documented here.
Root cause
The report points to a session management mistake: when 2FA is enabled on an account, the application does not invalidate the account's other active sessions. Those sessions were created before 2FA existed for the account, and they keep their authenticated state after the security setting changes. The report does not explain the underlying mechanism.
Impact
The report frames the impact around the gap between what 2FA is supposed to guarantee and what the stale session allows. Once 2FA is activated, the expectation stated in the report is that login requires the 2FA code. But any session that was already open before activation stays valid, and from it the password can be changed without ever supplying a 2FA code. In the researcher's words, the expected and recommended behaviour is to terminate the other sessions, request a new login, request the 2FA code, and only then give the account access again.
The practical consequence is that enabling 2FA does not lock out someone who already holds a session. The report does not demonstrate account takeover beyond the password change and does not describe any further actions from the stale session.
How this kind of bug works
Authentication state in most web applications lives in a session: a cookie or token that the server maps to a user. 2FA is an additional check performed at login time, before that session is issued. The two are separate concerns, and the bug class appears when a change to the account's security posture (enabling 2FA, disabling it, changing the password, changing the email address) does not propagate to sessions that already exist.
A session that was issued before 2FA was enabled was never challenged for a second factor, yet the server still treats it as authenticated. If the application also fails to require a fresh 2FA check, or a recent re-authentication, for sensitive operations such as a password change, the stale session can perform those operations. The same pattern appears when a password change does not revoke other sessions: an attacker holding a session keeps access even after the victim resets their credentials.
The defence is server-side session lifecycle management: a per-user session version or a list of active sessions, incremented or pruned whenever a security-relevant change happens, so that older sessions become invalid and the user must log in again and pass 2FA. Requiring the current password, and ideally a fresh second factor, for sensitive changes adds a second layer.
How to test for it
This is a manual, multi-session test. The general method:
- Create an account and log in from two separate browser profiles or clients, so you hold two independent sessions, A and B.
- In session A, enable 2FA on the account and complete the enrolment.
- In session B, reload a page that shows authenticated state and then attempt a sensitive action, such as changing the password, changing the email address, or viewing account settings.
- Observe whether session B is still authenticated and whether the sensitive action succeeds without any 2FA prompt or password confirmation.
- Repeat the reverse direction: change the password in one session and check whether the other session survives, and disable 2FA and check the same.
A positive result looks like session B remaining fully usable, and in particular a sensitive change succeeding from a session that never passed the second factor. Useful variations include waiting between steps, using an API client with a copied session cookie instead of a browser, and testing whether the stale session can also disable 2FA or add a new second factor.
Common false positives: the application may deliberately keep sessions alive but require re-authentication for sensitive actions, which is a weaker but sometimes accepted design; the second browser may have silently shared the session through the same cookie jar; or the password change may have actually failed and only the UI updated. Confirm with the server response, not the page rendering, and check whether the old session is rejected on the next request after a short delay.
How it is fixed
Standard fixes for this bug class:
- Invalidate all other sessions when 2FA is enabled or disabled, when the password changes, and when the email address changes, forcing a new login and a fresh 2FA challenge.
- Maintain a per-user session version or session registry and bump or clear it on those events, so old cookies stop authenticating.
- Require the current password, and preferably a fresh second factor, before sensitive account changes.
- Show the user their active sessions and allow them to terminate them.
Hunting notes
This bug class tends to hide in account settings flows: 2FA enrolment and removal, password and email changes, linked social logins, API key creation, and session management pages. It is more likely on applications that added 2FA later, where session handling predates the second factor, and on sites with long-lived "remember me" cookies.
Recon signals include a profile or security settings page that offers 2FA, a password change form, and any indication of multiple sessions or devices. Watching whether the application sets a new session cookie after a security change is a quick tell.
To get the report accepted, show the full sequence with two clearly independent sessions, capture the server responses for the sensitive action from the stale session, and state the security expectation the application violates: after 2FA is enabled, sessions that never passed it should no longer be able to act. Keep the impact concrete, for example a password change from a session that bypassed the second factor, rather than claiming a full takeover you did not demonstrate.
What happened, in plain words
This report is about the SideFX website at https://sidefx.com and its two-factor authentication (2FA) system. Two-factor authentication means logging in with two things: your password plus a second proof, such as a short code from an app on your phone. The idea is that a stolen password alone is not enough to get in.
The researcher found that turning 2FA on does not close the doors that are already open. If someone is logged in to the same account in another browser, that other browser stays logged in after 2FA is enabled, and the researcher then changed the account password from it without entering a 2FA code.
The report was sent to the SideFX program on HackerOne.
The steps the researcher took
The reproduction uses two browsers logged in to the same account at the same time. Each browser holds its own session: a session is the server's memory of "this browser is logged in as this user", usually kept alive by a cookie, which is a small piece of data the browser stores and sends back with every request.
- Log in to the same account in two different browsers. You now have two independent sessions for one account.
- In the first browser, go to
https://sidefx.com/profileand complete all the steps to enable 2FA. The report marks this state as "2FA activated". This is the moment the account's security level changes. - In the second browser, reload the page. The account is not logged out and the session is still alive. This is the core of the bug: the security change did not reach the other session.
- In that second browser, which never passed a 2FA challenge, change the password. The report ends this step with "BOOM!".
Step 3 matters because a reload is the simplest way to ask the server "am I still logged in?". The answer should have been no, because that session was created before 2FA existed for the account and was never checked for a second factor. Step 4 matters even more: changing the password is a sensitive action, and it was attempted from a session that had bypassed the new protection entirely.
The researcher attached a single screen recording of the flow:
The report does not include any HTTP requests, parameters, headers or server responses, so the exact addresses behind the profile page and the password change are not documented.
Why it is a problem
The report frames the impact around the gap between what 2FA promises and what the leftover session allows. Once 2FA is activated, the expectation stated in the report is that login requires the 2FA code. But any session that was already open before activation stays valid, and from it the password can be changed without ever supplying a 2FA code.
In the researcher's words, the expected and recommended behaviour is to terminate the other sessions, request a new login, request the 2FA code, and only then give the account access again.
The practical consequence is that enabling 2FA does not lock out someone who already holds a session. The report does not demonstrate account takeover beyond the password change and does not describe any further actions from the stale session.
In general, how this kind of bug works
Authentication state in most web applications lives in a session: a cookie or token that the server maps to a user. A useful comparison is a hotel key card. When you check in, the front desk programs a card that opens your room. If the hotel later upgrades the locks, a card programmed before the upgrade may still open the door unless the hotel reprograms or cancels it.
2FA is an additional check performed at login time, before that session is issued. The two are separate concerns, and the bug class appears when a change to the account's security posture (enabling 2FA, disabling it, changing the password, changing the email address) does not propagate to sessions that already exist.
A session that was issued before 2FA was enabled was never challenged for a second factor, yet the server still treats it as authenticated. If the application also fails to require a fresh 2FA check, or a recent re-authentication, for sensitive operations such as a password change, the stale session can perform those operations. The same pattern appears when a password change does not revoke other sessions: an attacker holding a session keeps access even after the victim resets their credentials.
The defence is server-side session lifecycle management: a per-user session version or a list of active sessions, incremented or pruned whenever a security-relevant change happens, so that older sessions become invalid and the user must log in again and pass 2FA. Requiring the current password, and ideally a fresh second factor, for sensitive changes adds a second layer.
How to test for it
This is a manual, multi-session test. The general method:
- Create an account and log in from two separate browser profiles or clients, so you hold two independent sessions, A and B.
- In session A, enable 2FA on the account and complete the enrolment.
- In session B, reload a page that shows authenticated state and then attempt a sensitive action, such as changing the password, changing the email address, or viewing account settings.
- Observe whether session B is still authenticated and whether the sensitive action succeeds without any 2FA prompt or password confirmation.
- Repeat the reverse direction: change the password in one session and check whether the other session survives, and disable 2FA and check the same.
A positive result looks like session B remaining fully usable, and in particular a sensitive change succeeding from a session that never passed the second factor. Useful variations include waiting between steps, using an API client with a copied session cookie instead of a browser, and testing whether the stale session can also disable 2FA or add a new second factor.
Common false positives: the application may deliberately keep sessions alive but require re-authentication for sensitive actions, which is a weaker but sometimes accepted design; the second browser may have silently shared the session through the same cookie jar; or the password change may have actually failed and only the UI updated. Confirm with the server response, not the page rendering, and check whether the old session is rejected on the next request after a short delay.
How it is fixed
Standard fixes for this bug class:
- Invalidate all other sessions when 2FA is enabled or disabled, when the password changes, and when the email address changes, forcing a new login and a fresh 2FA challenge.
- Maintain a per-user session version or session registry and bump or clear it on those events, so old cookies stop authenticating.
- Require the current password, and preferably a fresh second factor, before sensitive account changes.
- Show the user their active sessions and allow them to terminate them.
Where to look for it
This bug class tends to hide in account settings flows: 2FA enrolment and removal, password and email changes, linked social logins, API key creation, and session management pages. It is more likely on applications that added 2FA later, where session handling predates the second factor, and on sites with long-lived "remember me" cookies.
Recon signals include a profile or security settings page that offers 2FA, a password change form, and any indication of multiple sessions or devices. Watching whether the application sets a new session cookie after a security change is a quick tell.
To get the report accepted, show the full sequence with two clearly independent sessions, capture the server responses for the sensitive action from the stale session, and state the security expectation the application violates: after 2FA is enabled, sessions that never passed it should no longer be able to act. Keep the impact concrete, for example a password change from a session that bypassed the second factor, rather than claiming a full takeover you did not demonstrate.
Glossary
- 2FA (two-factor authentication): a login method that requires two separate proofs, usually a password plus a one-time code.
- Session: the server's record that a particular browser is logged in as a particular user, kept alive by a cookie or token.
- Cookie: a small piece of data a website stores in your browser and receives back on each request, often used to identify the session.
- Token: a value used in place of, or alongside, a password to prove identity, such as a session token.
- Session cookie: a cookie that carries the session identifier.
- Session invalidation: making an existing session stop working, so the browser must log in again.
- Stale session: a session that is still accepted even though the account's security settings have changed since it was created.
- Re-authentication: asking the user to prove their identity again, for example by re-entering the password, before a sensitive action.
- Sensitive action: an operation that can affect account security, such as changing the password or email address.
- Improper Access Control: a weakness where the application lets someone do something they should not be allowed to do.
- Vulnerability class: a family of bugs that share the same underlying cause.
- False positive: a test result that looks like a bug but is not, for example because the action actually failed on the server.
- API client: a tool that sends requests to a website directly, without a browser interface.
- Cookie jar: the browser's store of cookies for a site; two tabs sharing one cookie jar share one session.
- Server response: what the web server sends back after a request, including status codes and data.
- Endpoint: a specific address on a website that handles a particular action.
- Bounty: a payment a company makes to a researcher who reports a valid security bug.