Summary
NocoDB can improperly change a user's default-workspace role when their legacy organization role is updated. A revoked user with an existing session token may regain Creator-level access to default-workspace bases, including the ability to read and modify data or schemas.
Affected context
The issue occurs in NocoDB's organization-user role update handling, where a legacy organization role change can also rewrite a user's default-workspace role. Deployments may be at risk when this role update path is used and a revoked user's existing session remains usable.
Exploit preconditions
- Attack surface: Organization-user role update handling in the application
- Required access: An existing session token for the affected revoked user; the description does not specify who must initiate the role update
- Trigger point: An update to the user's legacy organization role
- Why exploitation is possible: The update can rewrite the default-workspace role, potentially restoring Creator-level permissions despite the user's revoked status
Why this happens
The role update logic improperly manages authorization state by allowing a legacy organization-role change to affect a separate default-workspace role. This inconsistent handling of privileges maps to CWE-269: Improper Privilege Management. Authorization changes should preserve revocation and scope boundaries rather than implicitly restoring broader permissions.
Potential impact
- A revoked user may regain Creator-level access to default-workspace bases
- The user could read or modify data in those bases
- The user could make schema changes
- Inconsistent role state could weaken confidence in access revocation
General mitigation guidance
Mitigation patterns focus on keeping organization and workspace authorization state separate and ensuring revocation takes precedence over role synchronization.
Common defensive patterns include:
- Applying explicit, scope-aware authorization rules when roles are updated
- Ensuring role changes cannot implicitly restore access after revocation
- Revalidating authorization against current server-side state rather than relying only on an existing session
- Applying least privilege and minimizing permissions granted by default
- Testing role updates, revocation, and session behavior together
How teams detect issues like this
Review role-update code for implicit changes across organization and workspace scopes, especially where legacy roles are mapped to current permissions. Code review and static analysis can flag authorization decisions that rely on stale session claims or update one permission scope as a side effect of another.
Monitor audit logs for role changes followed by access from accounts marked revoked, and use policy checks to verify that revocation cannot be overridden by role synchronization.

