Summary
Craft CMS contains a privilege-escalation vulnerability in user registration that can preserve an administrator flag associated with a deactivated admin account. When public registration is enabled and email verification is disabled, an attacker who registers using that email address may obtain administrator privileges.
Affected context
The issue can arise in Craft CMS deployments where public user registration is enabled and email verification is disabled. It specifically involves registration behavior for email addresses previously associated with deactivated administrator accounts, where administrative status may not be cleared before the new account is created.
Exploit preconditions
- Attack surface: Public user registration
- Required access: No existing authenticated account may be required; the attacker needs an email address associated with a deactivated administrator account
- Trigger point: Creation of a new account through the registration workflow
- Configuration dependency: Public registration must be enabled and email verification must be disabled
- Why exploitation is possible: The registration process may retain an administrative flag from the deactivated account instead of resetting privileges for the newly registered user
Why this happens
The underlying bug is insufficient privilege-state validation during account registration. A security-sensitive administrator flag associated with a prior account remains eligible for reuse when a new account is created with the same email address. This maps to CWE-269: Improper Privilege Management, because authorization state is not reliably reset or revalidated across an account lifecycle transition.
Potential impact
- An attacker may obtain administrator privileges
- The attacker could modify application settings, content, users, or extensions
- The application may be used to access or alter sensitive data
- Compromised administrative access can enable further application or infrastructure compromise
General mitigation guidance
Mitigation generally focuses on ensuring that privilege attributes are never inherited solely from an email address or a prior account record.
Common defensive patterns include:
- Resetting administrative and other privileged flags when creating a new account
- Requiring explicit, independently validated authorization for administrator status
- Treating email addresses as identifiers rather than authorization evidence
- Keeping public registration and email verification controls aligned with the application's risk profile
- Applying least privilege to newly created accounts and separating account creation from privilege assignment
- Requiring additional approval or step-up authentication for administrative role changes
How teams detect issues like this
Organizations can assess for this class of issue through:
- Static analysis of account-creation code for copied privilege fields or trusted attributes
- Code review checks covering deactivated-account reuse and identity lifecycle transitions
- Dynamic tests that register accounts using identifiers formerly associated with privileged users
- Policy enforcement requiring explicit authorization checks for role and privilege assignment
- Monitoring for newly created administrator accounts, unexpected role changes, and registrations tied to previously privileged identities
Automated security review tools may help identify authorization fields that flow into new-account records without independent validation.

