Budibase Tenant Confusion Creates Global Admins (CVE-2026-122247)
An unauthenticated request to a self-hosted Budibase instance can create a new tenant database and a global-admin user; fixed in 3.50.0.
TL;DR
- The setup endpoint
POST /api/global/users/initchecks for users inside a tenant named in the request body. An attacker names an unused tenant, so the check passes after setup. - Self-hosted Budibase instances that run a release before 3.50.0 are affected. The request needs no authentication and no CSRF token.
- The advisory rates the flaw High, CVSS v3.1 8.2. A full public proof of concept is in the advisory. No exploitation is known, and the CVE is not in CISA KEV as of 2026-11-21.
- Upgrade to Budibase 3.50.0 or later. The current release is 4.0.1. See "How do I fix it?" for the reverse-proxy workaround.
Am I affected?
All of these must hold:
- The deployment is self-hosted and runs in single-tenant mode, so
/api/system/environmentreports"multiTenancy":false. - The Budibase application runs a release before 3.50.0.
- An attacker can reach the Budibase HTTP endpoint that fronts the worker API, normally on port 10000.
- The instance has already been set up, so the legitimate first-run account exists.
A cloud deployment and a self-hosted instance with multi-tenancy enabled use the same endpoint. The advisory's reproduction targets a self-hosted single-tenant instance. In that mode, the new guard in 3.50.0 requires a valid internal API key whenever the request names a tenant other than default.
Budibase is a low-code platform for internal tools. A self-hosted install runs a worker and an application server, plus CouchDB. The worker exposes the global user API. CouchDB stores one global database per tenant, named <tenantId>_global-db.
| Release | Affected | First fixed release |
|---|---|---|
| 3.49.0 and earlier | Yes | 3.50.0 |
| 3.50.0 and later, including 4.0.1 | No | Fixed |
The GitHub advisory lists @budibase/server 3.38.1 and earlier, because 3.38.1 is the last version published to npm. The fix commit is absent from the 3.44.0 and 3.49.0 source tags. It is present in 3.50.0, so Docker and source deployments through 3.49.x carry the flaw.
Check the deployment:
# Public environment endpoint, no authentication needed
curl -s https://budibase.example.com/api/system/environment
# The image tag of the running container
docker inspect budibase --format '{{.Config.Image}}'
# The worker package version inside the container
docker exec budibase sh -c "node -p \"require('/app/packages/worker/package.json').version\"" 2>/dev/null
A response with "multiTenancy":false and a release earlier than 3.50.0 is the exposure. If the worker is not published directly, the proxy configuration still shows whether /api/global/users/init is reachable from untrusted networks.
How do I fix it?
Upgrade Budibase to 3.50.0 or later. The current stable release is 4.0.1.
- For Docker, pull the fixed image and recreate the container. A restart alone keeps the old image.
- For a source deployment, update to the 3.50.0 tag or later and rebuild the worker and application services.
- Confirm the running version after the upgrade with the
docker inspectorpackage.jsoncheck from "Am I affected?". - If the upgrade has to wait, block
POST /api/global/users/initat the reverse proxy or load balancer. The endpoint is only needed during first-run setup, so an established instance can deny it.
A second workaround is to put the instance behind an authenticating proxy for the worker API. That reduces exposure, but the endpoint remains reachable to anyone who can pass the proxy, so it is not a fix.
What is the root cause?
The setup endpoint trusts a tenant identifier supplied by the caller when it checks whether the instance has any users. On a single-tenant deployment, the only legitimate tenant is default, and the check never enforces that.
The endpoint is registered in three middleware lists. Those registrations are visible in packages/worker/src/api/index.ts at the 3.49.0 tag. Lines 41 and 83 hold the two route lists, and line 129 holds the CSRF list.
- The public-endpoint list contains
POST /api/global/users/init. - The no-tenancy list contains the same route.
- The no-CSRF list is built from the public-endpoint list.
The cloud-only guard is packages/worker/src/middleware/cloudRestricted.ts (lines 10 to 25). It checks for an internal API key only when the instance is not self-hosted and the account portal is enabled. On a self-hosted instance the guard calls next() without a check.
The controller then reads tenantId from the request body and runs the handler inside that tenant:
// packages/worker/src/api/controllers/global/users.ts:230-251, 3.49.0
const { email, password, tenantId, ssoId, givenName, familyName } =
ctx.request.body
await tenancy.doInTenant(tenantId, async () => {
const userExists = await checkAnyUserExists()
if (userExists) {
ctx.throw(403, "You cannot initialise once an global user has been created.")
}
const finalUser = await userSdk.db.createAdminUser(email, tenantId, {
password,
ssoId,
hashPassword,
requirePassword,
firstName: givenName,
lastName: familyName,
})
checkAnyUserExists() calls tenancy.getGlobalDB(), which resolves to <tenantId>_global-db. For any tenant name the attacker invents, that database is empty, so the guard passes. The handler then creates the database and a global-admin document inside it.
The request body also supplies the email and password for the new admin. The account is marked as a global administrator and as a builder. The advisory's proof of concept captured the full exchange against Budibase 3.44.0-cloud.2 on 2026-09-02.
How is it exploited?
- The attacker sends
POST /api/global/users/initto the worker API with a JSON body that contains an email, a password and an unusedtenantId. - The public-endpoint middleware admits the request without a session, and the no-tenancy middleware leaves the body's
tenantIdin place. - The controller opens the tenant named by the attacker and calls
checkAnyUserExists(). - The tenant's
<tenantId>_global-dbdoes not exist or has no users, so the guard returns false. - The controller creates the database and a global-admin user document in it.
- The attacker repeats the request with a new tenant name for each attempt, creating an unbounded number of databases and admin documents.
The advisory publishes the full request and response. This is the request from its proof of concept, with the attacker's values:
curl -s -i -X POST 'http://127.0.0.1:3014/api/global/users/init' \
-H 'Content-Type: application/json' \
-d '{"email":"pwn-f7poc@evil.test","password":"Pwned!2026#bb","tenantId":"f7poc"}'
The advisory records a 200 OK response with a new user id. A request that names default returns 403, because that tenant already has a user. The difference between the two responses is the bug.
The injected administrator cannot sign in while multi-tenancy remains off, because the login path does not route to the attacker's tenant. The demonstrated impact is the unauthorised write, the resource exhaustion and the latent admin accounts.
How does the attack flow?
One unauthenticated POST reaches a public setup route. The route checks a tenant the attacker names, and the check passes because that tenant is empty.
/api/global/users/init"] --> B["Public endpoint
admits the request"] B --> C["No-tenancy middleware
keeps the body tenantId"] C --> D["Guard checks users in
the attacker's tenant"] D --> E["Tenant database is empty,
so the guard passes"] E --> F["Budibase creates
a global-admin user"] F --> G["Attacker repeats with
new tenant names"]
What can an attacker do?
An unauthenticated attacker can create a CouchDB database and a global-admin user document on a self-hosted, single-tenant Budibase instance. Repeating the request creates more databases and more admin documents.
Every condition has to hold:
- The instance is self-hosted and single-tenant.
- The release is earlier than 3.50.0.
- The attacker can reach the worker API.
- The attacker can name a tenant that has no users yet, which is any unused name.
The advisory describes three consequences:
- The control that is meant to close first-run setup permanently is bypassed.
- A persistent write primitive creates unbounded databases, which exhausts CouchDB storage and can deny service.
- Latent rogue administrator accounts become usable if multi-tenancy is enabled later.
The advisory does not demonstrate a direct login to the injected account on a single-tenant instance. Treat the impact as unauthorised data creation, denial of service and a latent privilege problem, not as immediate full administrative access.
Why does the fix work?
The fix rejects the request unless it carries a valid internal API key, whenever the instance is multi-tenant or the body names a tenant other than default.
--- a/packages/worker/src/api/controllers/global/users.ts
+++ b/packages/worker/src/api/controllers/global/users.ts
@@ -230,6 +230,19 @@ export const adminUser = async (
const { email, password, tenantId, ssoId, givenName, familyName } =
ctx.request.body
+ 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 () => {
On a single-tenant instance, the only request that can pass without an internal API key is one that names default. That request still hits the existing guard and returns 403 after setup. A request that names an attacker-chosen tenant now needs a key that an unauthenticated caller does not have.
The check runs before tenancy.doInTenant(), so the attacker's tenant is never opened. The fix also covers multi-tenant instances, where any tenant name other than the default requires the internal key.
How do I check if I was compromised?
Look for tenant databases, admin documents and setup requests that you did not create.
Start with the CouchDB database list. A single-tenant Budibase instance should have the expected internal databases and the default tenant database. Any other <name>_global-db is a lead.
curl -s "$COUCHDB_URL/_all_dbs" | grep '_global-db'
Then check the worker access log. Look for setup requests sent after the instance was provisioned:
grep 'POST /api/global/users/init' /var/log/budibase/worker.log
A request with a tenantId other than default and a 200 response is evidence that the endpoint created a tenant. The advisory's proof of concept also shows the response contains a us_ document id.
No vendor indicators of compromise are published. A failed request may leave no trace beyond the access log. A successful request creates a database that looks like a legitimate tenant until you compare it with your records.
Timeline
- 2026-09-02: The advisory's proof of concept is captured against Budibase 3.44.0-cloud.2.
- 2026-09-16: The fix commit,
362a7fe9, adds the internal API key check. - 2026-10-19: Budibase 3.50.0 is released with the fix.
- 2026-11-20: The GitHub advisory and CVE-2026-122247 are published.
FAQ
Is a cloud-hosted Budibase instance affected?
The advisory's reproduction targets a self-hosted single-tenant instance. Budibase Cloud runs with multi-tenancy, where the fixed versions require an internal API key for a non-default tenant. If you run an earlier release, upgrade regardless.
Can the attacker log in as the account they create?
Not directly on a single-tenant instance. The login path does not route to the attacker's tenant while multi-tenancy stays off. The advisory describes the account as a latent administrator that becomes usable if multi-tenancy is enabled later.
Does the endpoint still exist after setup?
Yes. The fix does not remove the endpoint. It requires an internal API key for any request that names a tenant other than default, and the existing user check still blocks a second setup of default.
What is the fixed version?
Budibase 3.50.0 is the first release with the fix. The current stable release is 4.0.1. The GitHub advisory lists @budibase/server 3.38.1 as the last affected npm version, but the application releases through 3.49.x also lack the fix.
Is there a CVSS score?
Yes. The GitHub advisory rates the flaw High with CVSS v3.1 8.2. The vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H. The score reflects a network attack with no privileges, low integrity impact and high availability impact.
Was it exploited in the wild?
No exploitation is known, and CVE-2026-122247 is not in CISA KEV as of 2026-11-21. The advisory includes a working proof of concept, so an attacker can reproduce the request without writing new code.
References
- GitHub advisory GHSA-25qc-m4pw-2w8r: https://github.com/advisories/GHSA-25qc-m4pw-2w8r (checked November 21, 2026)
- CVE-2026-122247 record: https://www.cve.org/CVERecord?id=CVE-2026-122247 (checked November 21, 2026)
- Fix commit 362a7fe9: https://github.com/Budibase/budibase/commit/362a7fe9aea594531ece1cf15be76cc00bfb88b9 (checked November 21, 2026)
- Budibase 3.50.0 release: https://github.com/Budibase/budibase/releases/tag/v3.50.0 (checked November 21, 2026)
- Budibase 3.49.0 source, controller: https://github.com/Budibase/budibase/blob/v3.49.0/packages/worker/src/api/controllers/global/users.ts (checked November 21, 2026)
- Budibase 3.49.0 source, public endpoint list: https://github.com/Budibase/budibase/blob/v3.49.0/packages/worker/src/api/index.ts (checked November 21, 2026)
- Budibase 3.49.0 source, cloud-only guard: https://github.com/Budibase/budibase/blob/v3.49.0/packages/worker/src/middleware/cloudRestricted.ts (checked November 21, 2026)
- Budibase 3.49.0 source, user existence check: https://github.com/Budibase/budibase/blob/v3.49.0/packages/worker/src/utilities/users.ts (checked November 21, 2026)
- Docker Hub repository, 2,340,514 pulls: https://hub.docker.com/r/budibase/budibase (checked November 21, 2026)
- Budibase repository, 28,428 stars: https://github.com/Budibase/budibase (checked November 21, 2026)
- CISA Known Exploited Vulnerabilities catalog, version 2026.11.20: https://www.cisa.gov/known-exploited-vulnerabilities-catalog (checked November 21, 2026)