Summary
NocoDB can fail to bootstrap its super-admin account when the admin password environment variable is empty, leaving a fresh instance vulnerable to public signup. An unauthenticated person who signs up first may receive Creator and Super Admin roles, gaining administrative control.
Affected context
The issue affects NocoDB instances where the super-admin bootstrap logic in initAdminFromEnv.ts encounters an empty admin password environment variable. It is particularly relevant during fresh-instance setup if the public signup endpoint is available before an administrator account has been established.
Exploit preconditions
- Attack surface: Public signup endpoint on a fresh NocoDB instance
- Required access: No prior authentication is required
- Trigger point: Signup occurs before super-admin bootstrap has established an administrator
- Why exploitation is possible: An empty admin password causes bootstrap to be skipped, while signup can grant the first registrant Creator and Super Admin roles
Why this happens
The initialization logic silently skips super-admin creation when the configured admin password is empty, without ensuring that another trusted administrative account exists before public signup is allowed. This is an authorization and privilege-management weakness mapped to CWE-269: Improper Privilege Management: a user can receive privileges beyond those appropriate for an unauthenticated signup flow.
Potential impact
- An unauthenticated registrant may gain Super Admin privileges
- An attacker could gain control over administrative settings and users
- Data or workspace configurations could be accessed or changed
- Administrative access could be used to disrupt the instance or affect its data
General mitigation guidance
Defensive patterns focus on ensuring that administrative initialization cannot be bypassed and that public signup never grants elevated privileges by default.
- Require valid, non-empty administrative credentials for bootstrap, and fail securely if they are absent
- Keep public signup disabled or restricted until a trusted administrator is established
- Assign new accounts only the minimum privileges needed
- Enforce authorization checks on privileged operations independently of account creation
- Limit administrative access and configuration changes to trusted identities
How teams detect issues like this
Review initialization and signup code for paths where missing or empty configuration silently bypasses administrator creation or authorization safeguards. Check that first-user registration cannot confer elevated roles and that privileged operations enforce role checks on the server. Policy checks can flag empty administrative secrets, publicly enabled signup during initial setup, and default role assignments that include administrative privileges; static analysis and automated code review may help identify these patterns.

