Описание
Craft CMS has unauthenticated activation email trigger with potential user enumeration
The actionSendActivationEmail() endpoint is accessible to unauthenticated users and does not require a permission check for pending users. An attacker with no prior access can trigger activation emails for any pending user account by knowing or guessing the user ID. If the attacker controls the target user’s email address, they can activate the account and gain access to the system.
The vulnerability is not that anonymous access exists - there’s a legitimate use case for it. The vulnerability is that the endpoint accepts arbitrary userId parameters without verifying ownership.
Craft CMS allows public user registration. When a user registers but doesn’t receive their activation email (spam filter, typo correction, etc.), they need a way to request a resend. This is why send-activation-email is in the allowAnonymous array - it’s intentional self-service functionality.
The Security Gap
The endpoint accepts userId as the identifier:
This allows any visitor to trigger activation emails for any pending user, not just their own registration.
Background
When administrators create new user accounts in Craft CMS, users are created in a “pending” state until they activate their account via an emailed link. The actionSendActivationEmail() function sends (or resends) this activation email.
Expected Behavior: Anonymous users should only be able to resend activation emails for their own registration.
Actual Behavior:
- The endpoint is listed in
allowAnonymous- no login required (intentional for self-service) - For pending users, there is NO ownership verification
- Any unauthenticated visitor can trigger activation emails for ANY pending user by ID
Attack Scenarios
Scenario 1: Targeted Account Takeover
Prerequisites: Attacker controls target user’s email (compromised email, shared mailbox, typosquatting, etc.)
Scenario 2: User ID Brute-Force Enumeration
Scenario 3: GraphQL + Targeted Attack
Prerequisites: GraphQL public schema allows user queries
Scenario 4: Email Spam / Harassment
References
https://github.com/craftcms/cms/commit/c3d02d4a7246f516933f42106c0a67ce062f68d8
Пакеты
craftcms/cms
>= 5.0.0-RC1, < 5.9.0-beta.2
5.9.0-beta.2
craftcms/cms
>= 4.0.0-RC1, < 4.17.0-beta.2
4.17.0-beta.2
Связанные уязвимости
Craft is a content management system (CMS). Prior to 5.9.0-beta.2 and 4.17.0-beta.2, the actionSendActivationEmail() endpoint is accessible to unauthenticated users and does not require a permission check for pending users. An attacker with no prior access can trigger activation emails for any pending user account by knowing or guessing the user ID. If the attacker controls the target user’s email address, they can activate the account and gain access to the system. This vulnerability is fixed in 5.9.0-beta.2 and 4.17.0-beta.2.