Summary
A privilege management flaw in Budibase's global user onboarding API allows builder-level users to directly create new accounts with elevated roles, including global administrators.
When SMTP email is not configured, the admin-only invite flow is bypassed, enabling a builder to obtain credentials for a newly created admin user and gain full control over the platform.
Affected context
This vulnerability affects Budibase deployments where:
- The
/api/global/users/onboardendpoint is protected only byworkspaceBuilderOrAdminmiddleware. - SMTP email is not configured, which is common in default self-hosted setups.
- The onboarding flow uses a direct
bulkCreatecall that accepts role assignments from the request body.
In this context, builder-level users can reach a code path intended for admin-controlled invitations, but which instead directly provisions accounts with arbitrary roles.
Exploit preconditions
- Attack surface: Authenticated HTTP POST requests to
/api/global/users/onboard. - Required access: Any valid Budibase account with builder-level permissions in a workspace.
- Configuration state: SMTP email unconfigured or disabled, causing the system to skip the email-based admin invite flow.
- Trigger point: Submitting a crafted onboarding request where the payload specifies elevated roles (e.g., admin, builder) for the new user(s).
- Why exploitation is possible: The endpoint trusts role data from builder-level users and invokes
bulkCreatedirectly, without enforcing a strict separation between who can assign privileged roles and who can merely create standard users.
Why this happens
The underlying issue is improper enforcement of authorization rules around role assignment and user provisioning.
Instead of restricting creation of privileged accounts to administrators and validating that role-granting operations originate from a high-privilege context, the system exposes /api/global/users/onboard behind middleware that treats builders and admins equivalently. When SMTP is not configured, the intended admin-controlled invite flow is bypassed altogether and the API directly provisions users via bulkCreate, accepting roles from the untrusted request body. This aligns with CWE-269: Improper Privilege Management, where authorization boundaries between different roles (builder vs. admin) are not clearly enforced in the control logic.
Potential impact
- A builder-level user may create a new global admin account.
- Attackers could obtain the generated password for the new admin user directly in the API response.
- Full administrative control over Budibase, including user management, application configuration, and data access, could be gained.
- Malicious configuration changes or data exfiltration could be performed under an administrative identity.
- Persistent backdoors (e.g., additional admin accounts) may be established to maintain long-term access.
General mitigation guidance
Effective mitigation focuses on tightening authorization boundaries and minimizing trust in client-supplied role information:
- Enforce clear separation of duties so that only users already holding an admin-level role can assign or modify privileged roles.
- Centralize authorization checks for role assignment and user provisioning, ensuring that every path to creating or updating users passes through consistent privilege validation logic.
- Avoid trusting role or permission fields from client requests; instead, derive or constrain them based on server-side policy and the caller's existing privileges.
- Design the onboarding process so that privileged account creation always requires an admin-mediated step, independent of email/SMTP configuration.
- Introduce defense-in-depth controls such as requiring elevated actions (e.g., creating admins) to be confirmed via a second factor, out-of-band confirmation, or explicit policy approval.
- Apply least privilege principles to intermediate roles like builders, limiting their capabilities to application development tasks rather than global account administration.
How teams detect issues like this
Detection can focus on both code-level patterns and runtime behavior:
- Static and code review checks:
- Identify endpoints where role or permission attributes are accepted from client input and passed directly into user creation or update logic.
- Flag middleware or guard functions that treat mid-tier roles (like builders) as equivalent to admins for sensitive operations.
- Look for calls to user provisioning functions (e.g.,
bulkCreate) that lack a clear, centralized authorization check specifically for role elevation. - Security policy enforcement:
- Implement linting or policy rules that disallow privileged role assignment unless an explicit admin-only guard is present.
- Use automated review tools to scan for endpoints that can create users or modify roles without verifying the caller's highest-privilege status.
- Runtime monitoring:
- Log and monitor events where new admin or similarly privileged accounts are created, especially by non-admin users.
- Set alerts on suspicious spikes in user creation activity or repeated attempts to assign high-privilege roles from lower-privileged accounts.

