
Differential PoC lab for CVE-2026-126273: exploits NocoDB's skipped admin bootstrap so the first unauthenticated signup gains Super Admin, and verifies the fail-closed fix.
| CVE | CVE-2026-126273 (GHSA-mjxv-r6j7-m8gv, Critical 9.2 CVSS v4) |
| Component | NocoDB — packages/nocodb/src/helpers/initAdminFromEnv.ts / UsersService.signup() |
| Affected | < 2026.09.0 |
| Fixed in | 2026.09.0 (fail-closed bootstrap) |
| CWE | CWE-269 (Improper Privilege Management) |
| Impact | On an instance deployed with NC_ADMIN_EMAIL set and NC_ADMIN_PASSWORD empty, the first unauthenticated caller of the public signup endpoint receives org-level Creator and Super Admin roles — full administrative control |
| Vector | Unauthenticated POST /api/v1/auth/user/signup, first-comer |
| Trigger | Empty NC_ADMIN_PASSWORD (falsy) silently skips the entire bootstrap |
| Credit | Reported by @sec-reex; advisory published by mertmit (NocoDB) |
An operator who sets the admin email but leaves the password blank intends the deployment to be admin-bootstrapped and closed to strangers. NocoDB before 2026.09.0 instead silently skips the bootstrap: no admin row, no error, no warning. The HTTP surface then comes up with zero user rows, and UsersService.signup() grants the first user of a non-cloud instance the org Creator and Super Admin roles — a branch that normally never fires because the bootstrap has already created the first user before the server accepts connections. Whoever calls the public signup endpoint first owns the deployment. The decoded JWT says it plainly: the vulnerable instance returns roles = {"org-level-creator": true, "super": true} to the attacker; a correctly bootstrapped instance returns {"org-level-viewer": true} for the same call. The fix fails closed and loudly — the same misconfiguration now aborts the boot with a "Missing admin password" banner instead of shipping an open instance.
packages/nocodb/src/helpers/initAdminFromEnv.ts gates the whole bootstrap on a single truthiness test:
export default async function initAdminFromEnv(_ncMeta = Noco.ncMeta) {
if (process.env.NC_ADMIN_EMAIL && process.env.NC_ADMIN_PASSWORD) {
...
// insert the admin user, create the default workspace, ...
}
// neither branch: no admin row, no error, no log
}
An empty string is falsy, so [email protected] with NC_ADMIN_PASSWORD= skips the entire function body. Downstream, UsersService.signup() contains the first-user branch:
// UsersService.signup(): first user of a non-cloud instance
// -> org-level creator + super admin
which exists for the initial-setup flow and is normally unreachable — bootstrap has created the first user row before the HTTP listener starts. With bootstrap skipped, that branch hands the deployment to the first caller. The race window is not a race at all: it stays open for the whole life of the instance until someone signs up.
The fix in 2026.09.0 fails closed when operator intent is clear from the email alone:
╔═══════════════════════════ Missing admin password ═══════════════════════════╗
║ NC_ADMIN_EMAIL is set but NC_ADMIN_PASSWORD is empty, so the admin ║
║ account cannot be created. ║
║ ║
║ Set NC_ADMIN_PASSWORD, or unset NC_ADMIN_EMAIL to intentionally use ║
║ first-signup setup. ║
╚══════════════════════════════════════════════════════════════════════════════╝
and the process exits 1 instead of starting the HTTP surface.
The vulnerability condition is a configuration, not a build flag, so the lab runs the same official images under both configurations:
| service | image | NC_ADMIN_EMAIL | NC_ADMIN_PASSWORD | expected |
|---|---|---|---|---|
nocodb-vuln | 2026.08.2 | set | empty | boots silently, first signup → super |
nocodb-vuln-safe | 2026.08.2 | set | set | bootstrap completes, signup → viewer |
nocodb-fixed | 2026.10.1 | set | empty | refuses to boot (exit 1, banner) |
nocodb-fixed-safe | 2026.10.1 | set | set | boots, bootstrap completes |
nocodb-advisory | 2026.09.0 | set | empty | refuses to boot (the advisory's patched version, verified empirically) |
Each container is fresh (no volume): the SQLite user table starts empty, so the first-comer semantics are reproducible. All containers are CPU/memory bounded on the isolated cve126273lab network.
./run-lab.sh build # PoC runner image
./run-lab.sh sweep # boot-state matrix + exploit (fresh vuln) + probe + mitigation
./run-lab.sh down
run-lab.sh sweep restarts nocodb-vuln before the exploit — the escalation is first-comer only, so the run must begin with zero user rows.
Single modes:
podman run --rm --network=cve126273lab cve-2026-126273-poc:local exploit
poc/poc.py — stdlib-only, four modes:
| mode | purpose |
|---|---|
check | classify one instance by a canary signup and decode the JWT roles claim. The signup is the only observable of the condition; on a fresh instance it is the exploit itself (documented side effect). |
exploit | full differential: first-comer signup on the misconfigured vulnerable instance must claim super; the fixed build on the same configuration must refuse to boot. |
probe | companion primitives: a bootstrapped instance yields viewer-only signups (the escalation needs the misconfiguration), a second signup on the vulnerable instance is viewer-only (first-comer only), and the advisory's stated fixed version 2026.09.0 is empirically fail-closed. |
mitigation | the published workaround on the SAME vulnerable binary: complete the bootstrap (NC_ADMIN_PASSWORD set) — the super-granting branch closes. |
Exit codes: 0 safe / workaround validated, 1 vulnerable, 2 target unreachable (for the fixed side this is the fail-closed behavior), 3 primitive confirmed but inconclusive, 4 internal error.
| reproduction path | vulnerable 2026.08.2 (email set, password empty) | fixed 2026.10.1 / 2026.09.0 (same configuration) | evidence |
|---|---|---|---|
| boot state | running, no warning | exited, exit 1, "Missing admin password" banner | evidence/boot-states.txt |
| first unauthenticated signup | roles = {org-level-creator: true, super: true} | HTTP surface never starts (fail closed) | evidence/poc-exploit.txt |
| second signup | {org-level-viewer: true} — first-comer only | — | evidence/poc-probe.txt |
| bootstrapped instance, same binary | {org-level-viewer: true} | boots normally | evidence/poc-probe.txt |
| workaround (password set) | viewer-only signup — validated | — | evidence/poc-mitigation.txt |
check on an exhausted instance | rejected (slot consumed by the exploit run) | unreachable | evidence/poc-check-*.txt |
podman compose; --cpus 2 --memory 4g per container; isolated cve126273lab network.nocodb/nocodb images.run-lab.sh sweep handles the restart.podman compose down fully resets the lab.