GHSA-p8x7-9vfw-p7vc: Composer/craftcms/cms vulnerability
The vulnerability allows any authenticated user to change their own password without providing the current password or having an active elevated session. It also allows the attacker to change other users’ passwords if the attacker’s account has edit users permission (which doesn’t allow changing others’ passwords) and lacks Administrate users permission (which is required to change others’ passwords).
The vulnerability exists in the elements/save action when saving a User element. The UserPasswordValidator applies only a safe validator to the newPassword field without an on scenario restriction. This makes newPassword mass-assignable during the generic element save flow, completely bypassing the dedicated users/set-password action that enforces elevated session verification.
An attacker with any authenticated session (whether it’s hijacked or a normal / low-privileged user) can change their own password, and potentially take over administrator accounts.
Required Permissions - Access the control panel - Edit users (needed for the account takeover attack scenario)
Impact - Any authenticated user can change their own password without providing their current password. - Users with Edit users permission can change any user’s password, including administrators.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/craftcms/cmsto a version that resolves this vulnerability.Fixed in 5.10.8 - Configuration
Update the UserPasswordValidator so that the `newPassword` field is not mass-assignable in the `elements/save` flow (add scenario restriction for the safe validator / restrict when newPassword can be set), thereby forcing the generic save path to use the dedicated password-setting logic that requires elevated session verification.
UserPasswordValidator newPassword validation (scenario restriction) = Apply safe validator to newPassword with an on scenario restriction - Compensating control
Restrict the control panel and user-management functions to trusted administrators by enforcing access controls so only authorized users can perform password changes (e.g., limit the ability to edit users/admin accounts).