Headline
GHSA-36xx-7vf6-7mv3: Silverstripe Framework: Members with no password can be created and bypass custom login forms
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 created Member records, such as those used in unit tests, still allow blank passwords. You may have some Member records in your system already which have empty passwords. To detect these, you can loop over all Member records with Member::get() and pass each record into the below method. It might be sensible to create a BuildTask for this purpose.
private function memberHasBlankPassword(Member $member): bool
{
// skip default admin as this is created programatically
if ($member->isDefaultAdmin()) {
return false;
}
// return true if a blank password is valid for this member
$authenticator = new MemberAuthenticator();
return $authenticator->checkPassword($member, '')->isValid();
}
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).
Reported by: Sabina Talipova from Silverstripe and Christian Bünte
- GitHub Advisory Database
- GitHub Reviewed
- CVE-2023-32302
Silverstripe Framework: Members with no password can be created and bypass custom login forms
Package
composer silverstripe/framework (Composer)
Affected versions
< 4.13.14
>= 5.0.0, < 5.0.13
Patched versions
4.13.14
5.0.13
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 created Member records, such as those used in unit tests, still allow blank passwords. You may have some Member records in your system already which have empty passwords. To detect these, you can loop over all Member records with Member::get() and pass each record into the below method. It might be sensible to create a BuildTask for this purpose.
private function memberHasBlankPassword(Member $member): bool { // skip default admin as this is created programatically if ($member->isDefaultAdmin()) { return false; } // return true if a blank password is valid for this member $authenticator = new MemberAuthenticator(); return $authenticator->checkPassword($member, ‘’)->isValid(); }
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).
Reported by: Sabina Talipova from Silverstripe and Christian Bünte
References
- GHSA-36xx-7vf6-7mv3
- silverstripe/silverstripe-framework@7b21b38
- https://github.com/silverstripe/silverstripe-framework/releases/tag/4.13.14
- https://github.com/silverstripe/silverstripe-framework/releases/tag/5.0.13
Published to the GitHub Advisory Database
Jul 31, 2023
Last updated
Jul 31, 2023
Related news
Silverstripe Framework is the MVC framework that powers Silverstripe CMS. When a new member record is created and a password is not set, an empty encrypted password is generated. As a result, if someone is aware of the existence of a member record associated with a specific email address, they can potentially attempt to log in using that empty password. Although the default member authenticator and login form require a non-empty password, alternative authentication methods might still permit a successful login with the empty password. This issue has been patched in versions 4.13.4 and 5.0.13.