Invalidate session after password reset - hosted website
The hosted website did not invalidate a user's session after a password reset, contrary to OWASP guidance.
- Disclosed after 2 months
Hey team,
The Hosted Website doesn't invalidate session after the password is reset. It's one of the OWASP recommendations to terminate the session when a password is changed and force the user to re-login.
Quote from OWASP:
Renew the Session ID After Any Privilege Level Change
The session ID must be renewed or regenerated by the web application after any privilege level change within the associated user session.. Other common scenarios must also be considered, such as password changes
Source:
https://www.owasp.org/index.php/Session_Management_Cheat_Sheet#Renew_the_Session_ID_After_Any_Privilege_Level_Change
Steps to reproduce:
- Logon to https://hosted.weblate.org/accounts/reset/
- Request for password reset.
- Click the email link received
- Change the password and notice session is not reset.
Suggested Fix:
When the password is reset, force logout the user and redirect to login page with a message.
Some hackerone examples: https://hackerone.com/reports/15785 https://hackerone.com/reports/15852
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 application did not regenerate or invalidate the session identifier after a password reset.
What the attacker needed
A valid user account
The fix
When the password is reset, the application should force logout the user and redirect to the login page with a message.
How it was found
- Log on to the password reset page.
- Request a password reset.
- Click the email link received.
- Change the password and notice the session is not reset.
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 change your password, the website should make you log in again. Here, it did not, so the old session stayed active.
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.