Silverstripe Framework: Members with no password can be created and bypass custom login forms
Low severity
GitHub Reviewed
Published
Jul 31, 2023
in
silverstripe/silverstripe-framework
•
Updated Nov 8, 2023
Package
Affected versions
>= 5.0.0, < 5.0.13
>= 3.0.0, < 4.13.14
Patched versions
5.0.13
4.13.14
Description
Published to the GitHub Advisory Database
Jul 31, 2023
Reviewed
Jul 31, 2023
Published by the National Vulnerability Database
Aug 1, 2023
Last updated
Nov 8, 2023
When a new
Member
record was created in the cms it was possible to set a blank password. If an attacker knows the email address of the user with the blank password then they can attempt to log in using an empty password. The default member authenticator, login form and basic auth all require a non-empty password, however if a custom authentication method is used it may allow a successful login with the empty password. Starting with this release, blank passwords are no no longer allowed when members are created in the CMS. Programatically createdMember
records, such as those used in unit tests, still allow blank passwords. You may have someMember
records in your system already which have empty passwords. To detect these, you can loop over allMember
records withMember::get()
and pass each record into the below method. It might be sensible to create aBuildTask
for this purpose.Once you have identified the records with empty passwords, it's up to you how to handle this. The most sensible way to resolve this is probably to generate a new secure password for each of these members, mark it as immediately expired, and email each affected member (assuming they have a valid email address in the system).
Users would need to opt-in to insecure behavior by using a configuration which allowed for empty passwords. These configurations are not expected and hence this advisory is primarily informational in nature.
Reported by: Sabina Talipova from Silverstripe and Christian Bünte
References