Password policy changes not enforced for existing passwords
The password policy app is not active during initial setup, allowing weak passwords like admin/admin. After enabling a stronger policy, existing passwords are not checked or enforced, so users can keep weak passwords that violate the new rules.
- Disclosed after 6 days
So this is two reports in one. Sort of. But they are the same issue, or at least related.
- When you setup your nextcloud there is no password policy at all. There is the strength indicator.
I get the password policy app is not yet active at that point. But a minimum length would not be that insane or hard to enforce. I noticed this when setting up my test setup with admin/admin
- Now afterwards the password policy app was active. And I enabled the HaveIBeenPwned check. So now I have an admin password that doesn't pass any of the my criteria
- min password length (defaults to 8)
- no common passwords (admin is in there)
- not in HIBP (admin is also in there)
I would expect that if I set a stronger password policy all passwords have to follow that. Now since the passwords are stored hashed you can't do this at policy change time. However at login time you do have the password. And checking against the criteria is possible.
There should at the very least be a warning to the user that their password is not meeting the password criteria. And possibly even a warning to the administrators that a user is using a password that is not meeting the requirements. But one could even argue that a mandatory password change is in order.
Impact
Administrators of the system can feel like they have everything pretty well in check when they update the password policy to the latest standards. But in reality all the users that setup their accounts before could use very weak and insecure passwords.
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 policy is only applied when a password is set or changed, not during initial setup or at login for existing passwords.
Impact
Administrators may believe their system is secure after updating the password policy, but users with pre-existing weak passwords can continue to use them, potentially compromising security.
What the attacker needed
Nextcloud instance; admin access to enable password policy
The fix
The password policy should be enforced during initial setup and at login for existing passwords, with at least a warning and possibly a mandatory password change.
How it was found
- Set up a Nextcloud instance and create an admin account with a weak password such as admin/admin.
- Enable the password policy app and configure it to require a minimum length, block common passwords, and check against HaveIBeenPwned.
- Note that the existing weak password still meets no criteria and no warning is shown.
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 first install Nextcloud, there is no rule forcing you to pick a strong password, so you can set something like admin/admin. Later, even if an administrator turns on a password policy that requires longer or non-breached passwords, the system does not check existing passwords, so old weak passwords keep working.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.