GHSA-j9fc-w3mr-x6mv CVE-2026-73305
Budibase: Privilege escalation via public role assignment API missing app-level authorization
- Severity
- 8.8 / 10
- High · CVSS 3.1
- Exploit chance (EPSS)
- 0.52%
- Chance of exploitation in the next 30 days. Higher than 44.41% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-269 Improper Privilege Management
- CWE-862 Missing Authorization
- CWE-863 Incorrect Authorization
- Fix
- None yet
- No fixed version published
Description
Summary
Budibase 3.39.19 (commit 03fbabae4) is affected by a privilege-escalation / missing-authorization flaw in the public role-assignment API. An app-scoped builder (a user who builds only specific apps — user.builder.apps = [appA], not a global builder or admin) can grant themselves builder access to ANY other app in the tenant, or assign themselves/any user an arbitrary data-plane role (e.g. ADMIN) in any app, by calling POST /api/public/v1/roles/assign. The endpoint only authorizes the two global flags (admin, builder); the per-app appBuilder and role:{appId,roleId} grant vectors are passed to the backend without any authorization check that the caller controls the target app. Reproduced in a local authorized lab using the verbatim authorization-gate and SDK logic.
This is an incomplete fix of the role-assignment hardening in commit d63d1d9054 ("Inline public user global role validation"), which only ever validated the global flags.
Details
The issue is caused by authorization being implemented as a flag-level allowlist (admin/builder) instead of validating the scope the caller is granting.
Relevant code paths:
packages/server/src/api/controllers/public/globalRoleValidation.ts—validateGlobalRoleUpdate(ctx, roleUpdate)only checksroleUpdate.admin(requiresisAdmin) androleUpdate.builder(requiresisGlobalBuilder). TheGlobalRoleUpdateinterface declares only{ builder?, admin? };appBuilderandroleare not referenced.packages/server/src/api/controllers/public/roles.ts—assign()doesconst { userIds, ...assignmentProps } = ctx.request.body; validateGlobalRoleUpdate(ctx, assignmentProps); await sdk.publicApi.roles.assign(userIds, assignmentProps). TheappBuilder/roleprops pass through unvalidated.packages/pro/src/sdk/publicApi/roles.ts—assign(): foropts.appBuilderit setsuser.builder = { apps: existing.concat([getProdWorkspaceID(opts.appBuilder.appId)]) }; foropts.roleit setsuser.roles[getProdWorkspaceID(opts.role.appId)] = opts.role.roleId. No check that the caller builds the target app, anduserIdsis an arbitrary list (bulkGet). The only gate is theisExpandedPublicApiEnabled()license check.packages/server/src/api/routes/public/index.ts—applyAdminRoutes(roleEndpoints)attaches onlymiddleware.builderOrAdmin(nopublicApi, noauthorized(PermissionType.USER, …)).packages/backend-core/src/middleware/builderOrAdmin.ts— with aworkspaceIdpresent, it only requiresisBuilder(ctx.user, workspaceId). The attacker setsx-budibase-app-idto their own app (appA), so the gate passes.packages/backend-core/src/middleware/builderOnly.ts— on the worker,POST /api/global/self/api_keyonly requireshasBuilderPermissions(ctx.user), which is true for app-scoped builders, so the attacker can self-issue a public API key.packages/shared-core/src/sdk/documents/users.ts—isGlobalBuilderis false for app-scoped builders (so the globalbuilderflag is correctly blocked), whileisBuilder(user, appA)andhasBuilderPermissions(user)are true.
Attack flow:
- Attacker is an app-scoped builder of
appAonly (no global builder/admin). POST /api/global/self/api_key(worker) — passesbuilderOnlyviahasBuilderPermissions→ attacker obtains a public API key.POST /api/public/v1/roles/assignwith headerx-budibase-app-id: <appA prod id>and body{"userIds":["<self>"],"appBuilder":{"appId":"<appB>"}}—builderOrAdminpasses (isBuilder(user, appA)),validateGlobalRoleUpdateignoresappBuilder, the SDK pushesappBintouser.builder.apps.- Attacker is now a builder of
appB(and, via therolevector, can set any data-role such asADMINin any app).
Security boundary crossed:
- Before: builder of
appAonly. - After: builder of
appB(and any other app) → read/modify all rows, read datasource configs and exfiltrate stored datasource credentials, edit automations (including thebash/executeScript/executeQuerysteps); plus arbitrary data-role assignment in any app. - Why disallowed: the per-app builder model is meant to isolate builders to their assigned apps; a builder of one app must not gain authority over apps they were never granted.
PoC
Environment:
- Budibase version:
3.39.19, commit03fbabae4 - Deployment: Business/Enterprise license required (
isExpandedPublicApiEnabled) - Attacker role: app-scoped builder (
user.builder.apps=[appA]), not global builder/admin - Mock services: none needed for the unit-level proof; HTTP PoC script provided for a licensed lab
Steps (unit-level proof, no license needed — verbatim auth-gate + SDK logic):
- Run the verification harness:
cd D:/CVE-Hunting/budibase-audit-output/lab
node harness/verify-privesc-authz.cjs
- Observed result (evidence:
evidence/lab-privesc-authz.log):
[PASS-VALIDATION] appBuilder:{appId:APP_B} -> NOT rejected
[PASS-VALIDATION] role:{appId:APP_B, roleId:'ADMIN'}-> NOT rejected
[BLOCKED 403] builder:true (global) -> Only global builders or admins ...
[BLOCKED 403] admin:true (global) -> Only global admins ...
after : builder={"apps":["app_A...","app_B..."]} roles={"app_B...":"ADMIN"}
isBuilder(attacker, APP_B) now = true <-- escalated to builder of APP_B
Steps (HTTP PoC for a licensed lab — poc/privesc-roles-assign.sh):
# 1) self-issue API key
curl -X POST http://localhost:10000/api/global/self/api_key -H "Cookie: <attacker session>" -d '{}'
# 2) escalate: grant self builder of appB
curl -X POST http://localhost:10000/api/public/v1/roles/assign \
-H "x-budibase-api-key: <KEY>" -H "x-budibase-app-id: <appA prod id>" \
-H "content-type: application/json" \
-d '{"userIds":["<self global id>"],"appBuilder":{"appId":"<appB>"}}'
- Expected result:
The request should be rejected (403) — an app-scoped builder must not be able to grant
itself builder/role access to an app it does not control. Instead it returns 200 and the
grant is applied.
Evidence files:
evidence/lab-privesc-authz.logpoc/verify-privesc-authz.cjs,poc/privesc-roles-assign.sh
Runtime limitation: full HTTP end-to-end requires a Business/Enterprise license (isExpandedPublicApiEnabled); no license was cracked. The authorization defect is proven at unit level with the verbatim validation + SDK logic, and the route→validation→SDK call chain was independently verified by source review.
Source PoC
Impact
An attacker holding an app-scoped builder role on a single app in a licensed (Business/Enterprise) tenant can:
- escalate to builder of every other app in the tenant (cross-app/workspace isolation bypass);
- read and modify all rows in those apps;
- read those apps' datasource configurations and exfiltrate stored datasource credentials;
- edit automations in those apps, including server-side execution steps;
- assign arbitrary data-plane roles (e.g.
ADMIN) in any app to any user, including themselves.
It does not grant the global admin/builder flags (those are validated), so it is not a direct global-admin takeover; but cross-app builder is effectively a tenant-wide app/data-plane compromise. No real secrets were accessed during testing; the lab used canary-only data.
Affected versions
npm
| Package | Vulnerable | Fixed in |
|---|---|---|
| @budibase/server | <= 3.38.1 |
No fix yet |
How to fix
No fixed version has been published yet. Until one is, remove or replace the package, or turn off or isolate the affected feature. This page updates when a fix ships.
Severity breakdown
CVSS 3.1 8.8
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Weakness
CWE-269: Improper Privilege Management
The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.
How to prevent it
- Architecture and Design, Operation: Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.
- Architecture and Design: Follow the principle of least privilege when assigning access rights to entities in a software system.
- Architecture and Design: Consider following the principle of separation of privilege. Require multiple conditions to be met before permitting access to a system resource.
CWE-862: Missing Authorization
The product does not perform an authorization check when an actor attempts to access a resource or perform an action.
How to prevent it
- Architecture and Design: Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
- Architecture and Design: Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor [REF-7].
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
- Architecture and Design: For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page. One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.
- System Configuration, Installation: Use the access control capabilities of your operating system and server environment and define your access control lists accordingly. Use a "default deny" policy when defining these ACLs.
CWE-863: Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.
How to prevent it
- Architecture and Design: Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
- Architecture and Design: Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor [REF-7].
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
- Architecture and Design: For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page. One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.
- System Configuration, Installation: Use the access control capabilities of your operating system and server environment and define your access control lists accordingly. Use a "default deny" policy when defining these ACLs.
References
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-6x9p-4r67-5gjx Budibase authenticated arbitrary S3 signed upload URL issuance via `/api/attachments/:datasourceId/url` | High | Also affects @budibase/server |
| GHSA-5fpj-28rv-84r7 Budibase: SSRF in Automation Steps - Webhook, Zapier, N8N, Slack, Discord Bypass IP Blacklist | High | Also affects @budibase/server |
| GHSA-hfhx-w8p8-4hc7 Budibase: SSRF via bare fetch() in uploadUrl during AI table generation | Medium | Also affects @budibase/server |
| GHSA-v42f-v8xc-j435 Budibase: SSRF via DNS rebinding in the REST datasource integration | High | Also affects @budibase/server |
| GHSA-pmpg-2mxq-6xwr Budibase: NoSQL injection in MongoDB integration: collection dump, $where JS exec, cross-collection pivot, arbitrary update/delete | High | Also affects @budibase/server |
| GHSA-cr7p-cr3q-h5cm Budibase: Account Enumeration via Login Lockout Response Differential | Medium | Also affects @budibase/server |
| GHSA-pvcr-8mvp-w8qr Budibase: Chat-Link Handoff Identity Confusion (Same-Tenant Account-Link CSRF) | High | Also affects @budibase/server |
| GHSA-2xgg-r2wc-c5r2 Budibase: MySQL DESCRIBE Backtick Injection via multipleStatements in Database Connector | High | Also affects @budibase/server |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor