highCVSS 8.8Vulnerability

GHSA-j9fc-w3mr-x6mv

### 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 checks `roleUpdate.admin` (requires `isAdmin`) and `roleUpdate.builder` (requires `isGlobalBuilder`). The `GlobalRoleUpdate` interface declares only `{ builder?, admin? }`; `appBuilder` and `role` are not referenced. - `packages/server/src/api/controllers/public/roles.ts` — `assign()` does `const { userIds, ...assignmentProps } = ctx.request.body; validateGlobalRoleUpdate(ctx, assignmentProps); await sdk.publicApi.roles.assign(userIds, assignmentProps)`. The `appBuilder`/`role` props pass through unvalidated. - `packages/pro/src/sdk/publicApi/roles.ts` — `assign()`: for `opts.appBuilder` it sets `user.builder = { apps: existing.concat([getProdWorkspaceID(opts.appBuilder.appId)

Properties

ghsa_id
GHSA-j9fc-w3mr-x6mv
summary
Budibase: Privilege escalation via public role assignment API missing app-level authorization
severity
high
cvss_score
8.8
cve_id
GHSA-j9fc-w3mr-x6mv
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
is_ghsa_only
true
ghsa_published
2026-07-24T21:12:40Z
source_url
https://github.com/advisories/GHSA-j9fc-w3mr-x6mv
ghsa_updated
2026-07-24T21:12:41Z

Related Entities (6)

VULNERABLE_TO (1)

[Software]npm/@budibase/server

AFFECTS (1)

[Software]npm/@budibase/server

REPORTED_BY (1)

[Source]GitHub Advisory Database

HAS_WEAKNESS (3)

[Weakness]Missing Authorization
[Weakness]Incorrect Authorization
[Weakness]Improper Privilege Management

Explore deeper with Ninja Signal's threat intelligence graph