Summary
Budibase contained an authorization flaw in the public role-assignment endpoint that could allow an app-scoped builder to assign themselves builder access or another role in a different application. The issue becomes risky when cross-application ownership and role scope are not verified before processing the request.
Affected context
The vulnerability occurs in Budibase deployments using the public role assignment API when a request is made by an app-scoped builder. The affected validation path does not sufficiently confirm that the application associated with the builder and the application associated with the target role are the same. Where role assignment is exposed without effective application-bound authorization checks, an attacker may be able to cross an application boundary.
Exploit preconditions
- Attack surface: The public role-assignment API endpoint.
- Required access: An authenticated or otherwise authorized app-scoped builder account capable of reaching the endpoint.
- Trigger point: A role-assignment request processed by the global role validation logic.
- Why exploitation is possible: The authorization flow does not adequately verify both the builder's application scope and the target role's application scope before allowing the assignment.
Why this happens
The underlying bug is an authorization-boundary failure. The role-assignment validation logic invokes global role checks without consistently comparing the application's identifier associated with the requesting builder to the application's identifier associated with the target role. This maps primarily to CWE-862, Missing Authorization, and is also consistent with CWE-863, Incorrect Authorization, because a permitted user may be authorized for one application but incorrectly treated as authorized for another. The resulting pattern is insufficient object-level and tenant-level authorization on a cross-application resource.
Potential impact
- An attacker could obtain builder privileges in another application.
- An attacker could assign themselves or others an arbitrary role in a different application.
- Unauthorized users may access application data and datasource configuration.
- Automations could be viewed, modified, or triggered without appropriate authorization.
- The affected deployment could experience cross-tenant data exposure or integrity loss.
General mitigation guidance
Mitigation generally focuses on enforcing authorization at every resource
boundary rather than relying on the caller's broad role alone.
Common defensive patterns include:
- Verifying that the requesting principal, builder scope, target role, and target application belong to the same authorized application or tenant.
- Applying deny-by-default object-level authorization to role-assignment operations.
- Centralizing authorization checks so public and internal API paths use the same policy.
- Treating application identifiers supplied by clients as untrusted and resolving authorization context from trusted server-side state.
- Limiting role-management capabilities according to least privilege and separating application administration from ordinary builder access.
- Adding regression tests for cross-application role assignment and identifier tampering.
How teams detect issues like this
Organizations can identify similar issues through:
- Static and semantic analysis for authorization checks that omit object ownership or tenant identifiers.
- Code review of endpoints that accept both a principal or role identifier and an application identifier.
- Tests that attempt access to resources belonging to a different application or tenant.
- API policy enforcement requiring explicit resource-scope checks for role-management operations.
- Audit-log monitoring for unexpected role grants, especially grants crossing application boundaries.
- Automated security review tools that flag missing, inconsistent, or caller-controlled authorization predicates.

