Password reset link remains valid after email change
A password reset token sent to a user's old email address remained valid after the user changed their email address in the control panel. An attacker who gained access to the old email account could use the still-valid reset link to take over the Nextcloud account.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 5 months
- Disclosed after 6 months
Hey! I found a token miss configuration flaw in Nextcloud 9.0.50 [Latest version], When we reset password for a user a link is sent to the registered email address but incase it remain unused and email is updated by user from control panel then too that old token [reset link] sent at old email address remains valid.
A better explanation
1- User use reset feature to get reset link [Email : [email protected]] 2- User came to know about his old password so remain the link unused and the token not expires 3- Now User changes his email from control panel [New email : [email protected]] 4- But the old reset still remains valid after email change
In-case an attacker able to get access to user's old email account he can hack his Nextcloud account too via that link, so expiring the token at email change will be a better practice
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 password reset token is not invalidated when the account's email address is changed.
Impact
An attacker with access to the user's old email account could use the still-valid reset link to take over the Nextcloud account.
What the attacker needed
Attacker access to the old email account; victim requested a reset and left it unused; victim changed their email address
How it was found
- Request a password reset link, which is sent to the current email address.
- Leave the reset link unused so the token does not expire.
- Change the account email address from the control panel.
- Observe that the old reset link still works after the email change.
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 forget your password, a website emails you a special link that lets you set a new one. This report says that if you later change the email address on your account, the old link still works. So anyone who can read the old email inbox could still use that link to get into your 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.