Summary
NocoDB API tokens intended to be limited to one base may instead grant access to every base the token owner belongs to. Someone who obtains such a token could read, create, update, or delete records across those bases, including bases the owner joins later.
Affected context
The issue affects NocoDB deployments where API tokens are intended to be scoped to a specific base, but the token's base association is not retained or enforced during authorization. A valid token may consequently be treated as an account-wide credential for bases associated with its owner.
Exploit preconditions
- Attack surface: NocoDB APIs that accept the affected API tokens
- Required access: Possession of a valid token intended to be scoped to a base; the token may need to be leaked or otherwise obtained
- Trigger point: A request to read, create, update, or delete records in a base
- Why exploitation is possible: The token's base scope is not stored or checked, so authorization may rely on the owner's broader base memberships
Why this happens
The authorization logic fails to bind a base-scoped token to its intended base. Because the token's base_id is neither stored nor checked, possession of the token can be treated as sufficient authorization across bases available to its owner. This is an authorization enforcement failure mapped to CWE-863: Incorrect Authorization.
Potential impact
- An attacker may read records from bases beyond the token's intended scope.
- An attacker could create, modify, or delete records in those bases.
- Data confidentiality and integrity may be affected across multiple bases.
- Access could extend to bases the token owner joins after the token is issued.
General mitigation guidance
Defensive patterns include binding each token to its intended resource scope and enforcing that scope on every relevant API request. Authorization should default to denial when a token's scope is absent, ambiguous, or inconsistent with the requested base. Reduce exposure by limiting token access and lifetime, protecting tokens as credentials, and applying least privilege to both tokens and their owners.
How teams detect issues like this
Review token creation and authorization paths for consistent storage and enforcement of resource scope. Static analysis and code review can look for authorization decisions based only on account or membership identity when a request is base-specific. Policy tests can verify that a token is denied access to other bases, including bases joined after token creation, and monitoring can flag cross-base activity that does not match expected token scope.

