Summary
Craft CMS does not consistently verify administrator status when generating password reset URLs, allowing certain non-admin users with user-administration privileges to target administrator accounts. A valid reset URL can then be used to set a new administrator password, potentially resulting in complete control-panel takeover.
Affected context
The vulnerability occurs in Craft CMS password-reset workflows when a user has the administrateUsers permission but is not an administrator. Risk increases when the password-reset URL generation and password-setting actions rely on a verification code without binding the operation to an appropriately authorized administrator-management session.
Exploit preconditions
- Attack surface: Craft CMS control-panel password-reset actions
- Required access: An authenticated non-admin account with
administrateUserspermission - Trigger point: Generation and subsequent use of a password-reset URL for an administrator account
- Why exploitation is possible: The reset workflow fails to enforce the required administrator-status check, and the password-setting action validates the verification code without adequately validating the initiating session
Why this happens
The underlying issue is missing authorization enforcement in a sensitive account-recovery workflow. The endpoint permits a user with a related user-management permission to perform an operation reserved for administrator accounts, while the follow-up password-setting action does not sufficiently bind authorization to the caller's session. This behavior maps to CWE-862: Missing Authorization, in which an application fails to verify that the requester is permitted to perform a protected action.
Potential impact
- An attacker may reset an administrator's password
- An attacker could gain control of the Craft CMS control panel
- Administrative content, users, and site settings may be modified
- Sensitive application data may be accessed or altered
- A compromised administrator account can facilitate further compromise of connected systems
General mitigation guidance
Mitigation generally focuses on enforcing authorization consistently across every stage of password-reset and account-recovery workflows.
Common defensive patterns include:
- Require an explicit administrator authorization check before generating resets for administrator accounts
- Bind reset tokens to the intended account, authorized workflow, and appropriate session context
- Reauthorize sensitive password changes at the point where the new password is accepted
- Apply least privilege to user-management permissions and separate routine user administration from administrator-account recovery
- Invalidate outstanding reset tokens after use or after relevant account-security changes
- Record and alert on administrator password-reset activity
How teams detect issues like this
Organizations can identify similar authorization flaws through:
- Static analysis and route reviews that compare endpoint permissions with the sensitivity of the targeted resource
- Code review checks for password-reset or recovery actions that validate tokens without validating the initiating session
- Authorization tests covering non-admin users with delegated user-management permissions
- Policy enforcement requiring explicit authorization checks for administrator-account changes
- Audit-log monitoring for administrator password resets, unusual reset URL generation, and unexpected control-panel access
Automated security testing and code-review tools may help identify missing authorization checks, but coverage should include workflow-level and privilege-boundary tests.

