Summary
Formwork CMS versions 2.0.0 through 2.3.3 contain an authorization flaw in the account creation workflow that allows lower-privileged users to assign high-privileged roles such as admin.
An authenticated editor can create new accounts with administrative rights, resulting in full takeover of the CMS instance whenever account creation is exposed to non-admin users.
Affected context
This vulnerability appears in Formwork CMS deployments where:
- The application exposes user management or account creation functionality to non-administrative roles (e.g., editors).
- Role assignment during user creation is driven by client-provided input (e.g., form field or API parameter).
- The backend only verifies that the requested role exists, but does not validate that the current user is allowed to grant that role.
In such setups, any authenticated editor who can create accounts can indirectly escalate privileges by assigning administrative roles to new accounts.
Exploit preconditions
- Attack surface: Authenticated web interface or API for user/account creation.
- Required access: Valid user account with an editor-level role (or any role allowed to create users).
- Trigger point: Submission of a user creation request where the
roleor equivalent attribute is set to a high-privilege value (e.g.,admin). - Why exploitation is possible: The server-side authorization check validates only that the role exists but does not enforce role delegation rules or verify that the requesting user has permission to assign privileged roles.
Why this happens
The root cause maps to CWE-269: Improper Privilege Management.
The system correctly models different roles (e.g., editor, admin) but fails to enforce who may assign which roles when creating new accounts. This creates a horizontal-to-vertical escalation path: a non-admin user can indirectly gain admin power by creating a new account with elevated privileges.
Abstractly, this reflects a missing authorization check on role assignment, where business rules for privilege delegation (e.g., "only admins can create admins") are not enforced at the server side and trust is placed in the caller's request.
Potential impact
- An editor may create a new administrator account and gain full administrative control of the CMS.
- Attackers with editor accounts could modify or delete site content and configuration that should only be accessible to admins.
- Compromise of CMS configuration, plugins, themes, and potentially embedded secrets stored within the CMS.
- Creation of hidden backdoor admin accounts to maintain long-term unauthorized access.
- Preparation of further attacks against underlying infrastructure if administrative access exposes system-level integration points.
General mitigation guidance
Effective mitigation centers on tightening server-side authorization for privilege changes and role assignment:
- Enforce strict role delegation rules on the backend: only accounts with specific high-privilege roles (e.g., admin) should be permitted to create or modify accounts with those same or higher privileges.
- Treat role identifiers as sensitive attributes that cannot be freely set by untrusted clients; validate role changes against the current user's permissions regardless of client-side controls.
- Implement a clear privilege hierarchy and centralize authorization logic so that all user and role management actions go through a single policy layer.
- Apply the principle of least privilege to user-management features, exposing user creation and role assignment only to roles that genuinely require it.
- Consider separating "create user" from "assign role" operations and requiring an additional privileged step (e.g., admin confirmation) to grant elevated roles.
How teams detect issues like this
Organizations can detect similar authorization flaws through a combination of design review and technical controls:
- Code review: Examine user and role management endpoints to ensure that role assignment, role changes, and account creation all contain explicit checks comparing the requested role against the current user's maximum allowed delegation level.
- Static analysis: Configure rules to flag endpoints that modify role or permission fields without associated authorization checks or that rely solely on existence checks for roles.
- Access control policy review: Maintain a clear, documented matrix of which roles can assign or manage which other roles, and verify that implementation matches this matrix.
- Security testing: Perform role-based access control (RBAC) tests where lower-privileged accounts attempt to create or modify higher-privileged accounts, using manual or automated penetration testing tools.
- Logging and monitoring: Log all role assignment and user creation events with the initiator's identity and target role, and alert on suspicious patterns such as non-admin users creating admin accounts.

