GitHub Advisoryadvisory · npm

GHSA-c54j-xp92-wh28 Budibase: Builder-to-Admin Privilege Escalation via onboardUsers Endpoint Without SMTP Configuration

HIGH Published 2026-05-18 Modified 2026-06-08 Official page ↗
Aliases
CVE-2026-45716
Ecosystem
npm
Packages
@budibase/worker
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-269
Reviewed
2026-05-18

Affected packages

• npm @budibase/worker: < 3.38.1 → fixed in 3.38.1

Description

Summary The `POST /api/global/users/onboard` endpoint is protected by `workspaceBuilderOrAdmin` middleware, allowing any user with builder permissions to access it. When SMTP email is not configured (the default for self-hosted Budibase instances), this endpoint bypasses the admin-restricted invite flow and directly creates users via `bulkCreate`, accepting arbitrary `admin` and `builder` role assignments from the request body. A builder-level user can create a new global admin account and receive the generated password in the response, achieving full privilege escalation. Details The vulnerability stems from a mismatch between the authorization level of the `onboardUsers` endpoint and the user-creation capabilities it exposes when SMTP is not configured. Route definition (`packages/worker/src/api/routes/global/users.ts:93-109`): ```typescript builderOrAdminRoutes // { if (await isEmailConfigured()) { await inviteMultiple(ctx) // admin-only path (delegates to invite flow) return } // No SMTP → directly create users with attacker-controlled roles const users = ctx.request.body.map(invite => { const password = generatePassword(12) createdPasswords[invite.email] = password return { email: invite.email, password, forceResetPassword: true, roles: invite.userInfo.apps || {}, admin: { global: !!invite.userInfo.admin }, // ","admin":{"global":true},...}], "unsuccessful": [], "created": true } ``` Step 3: Login as the new admin: ```bash curl -s -X POST 'http://localhost:10000/api/global/auth/default/login' \ -H 'Content-Type: application/json' \ -d '{"username":"[email protected]","password":""}' ``` The attacker now has full global admin access. Impact • Privilege escalation: Any builder-level user can escalate to global admin on self-hosted Budibase instances without SMTP configured (the default deployment). • Full platform compromise: Global admin can access all apps, all data sources, manage all users, delete apps, and modify platform configuration. • Credential exposure: The generated password is returned in the HTTP response, giving the attacker immediate access to the new admin account. • Stealth: The created user appears as a legitimately onboarded user, making detection difficult without audit log review. • Wide applicability: Self-hosted Budibase instances commonly run without SMTP configuration, making this the default-exploitable path. Recommended Fix Move the `onboardUsers` route from `builderOrAdminRoutes` to `adminRoutes` to match the authorization level of `invite` and `inviteMultiple`: ```diff --- a/packages/worker/src/api/routes/global/users.ts +++ b/packages/worker/src/api/routes/global/users.ts -builderOrAdminRoutes +adminRoutes .post( "/api/global/users/onboard", buildInviteMultipleValidation(), controller.onboardUsers ) ``` Additionally, the `onboardUsers` controller should validate that the caller has sufficient permissions to assign the requested role level. Even admin users should not be able to create users with roles exceeding their own. Consider adding explicit validation in the controller: ```typescript // In onboardUsers, before bulkCreate: for (const invite of ctx.request.body) { if (invite.userInfo.admin && !ctx.user.admin?.global) { ctx.throw(403, "Only admins can create admin users") } } ```

Related

Alias · CVE (1)

  • CVE-2026-45716 Budibase is an open-source low-code platform. vulnerability

Weakness · CWE (1)

  • CWE-269 Improper Privilege Management weakness

References