Summary
Dokploy contains an authorization flaw that can allow a user with permission to create members, or a privileged self-hosted user, to assign an owner role when creating an account. Because owner accounts cannot be demoted through normal organization controls, successful abuse may result in permanent organization takeover.
Affected context
The issue affects Dokploy deployments where organization member creation and account provisioning rely on role values supplied to server-side procedures. Risk is highest when a user has member-creation privileges or when a self-hosted administrative interface permits privileged users to create accounts with selectable roles without enforcing a strict authorization policy.
Exploit preconditions
- Attack surface: Dokploy organization member-invitation and account-creation procedures
- Required access: A user account with
member:createpermission, or privileged access to the self-hosted account-provisioning functionality - Trigger point: Creation or invitation of an account with an owner-level role
- Why exploitation is possible: Server-side authorization does not adequately constrain which roles these account-creation paths may assign, and owner privileges cannot subsequently be demoted through normal organization controls
Why this happens
The underlying defect is improper privilege management, mapped to CWE-269. Role assignment is insufficiently constrained at a sensitive account-creation boundary, allowing a caller with narrower member-management privileges—or a privileged self-hosted operator—to obtain or grant a role with organization-wide authority. The system also lacks an effective lifecycle control for reversing an owner assignment, turning an authorization mistake into a potentially persistent takeover condition.
Potential impact
- An attacker may obtain permanent owner-level control of an organization
- An attacker could manage members, projects, deployments, and organization settings
- Sensitive application or deployment data may be exposed or modified
- Malicious accounts could be used to maintain persistence
- Deployments or infrastructure integrations may be disrupted or altered
General mitigation guidance
Mitigation generally focuses on enforcing server-side role authorization and reducing trust in client-supplied role values.
Common defensive patterns include:
- Allowing member-creation procedures to assign only explicitly permitted non-owner roles
- Requiring separate, narrowly scoped authorization for owner creation or transfer
- Enforcing organization and platform-wide role policies independently of UI restrictions
- Providing controlled owner-demotion, ownership-transfer, and account-recovery workflows
- Applying least privilege to self-hosted administrative operators and service accounts
- Recording and alerting on privileged role assignments and unexpected ownership changes
- Testing authorization decisions with both permitted and deliberately over-privileged role requests
How teams detect issues like this
Organizations can assess for this class of issue through:
- Static analysis and code review of account-creation procedures for direct use of caller-supplied role values
- Authorization tests that verify lower-privileged users cannot create or invite owner-level accounts
- Review of server-side permission checks rather than relying on frontend role restrictions
- Audit-log searches for newly created owner accounts, ownership changes, and unusual invitations
- Policy enforcement requiring approval or independent authorization for high-impact role assignments
- Automated security testing of role matrices, including escalation and persistence scenarios

