Summary
NocoDB has an authorization bypass that can let an authenticated Creator access another tenant's external database by reusing its source ID when adding a source. If the connection manager returns a cached connection based only on that ID, the attacker may be able to view the victim's schema and read or modify records through their own base models.
Affected context
The issue affects NocoDB deployments before 2026.08.1 where a Creator can add a source using a victim's source ID and the connection manager reuses cached connections keyed only by that ID. In this context, the cache key may not distinguish tenants, allowing a connection associated with one tenant to be exposed through another tenant's base models.
Exploit preconditions
- Attack surface: Source creation and database operations in NocoDB
- Required access: An authenticated account with the Creator role and knowledge of a victim source ID
- Trigger point: Adding a source with the victim's source ID, followed by access through the attacker's base models
- Why exploitation is possible: The connection cache uses a bare source ID rather than a tenant-scoped identity, potentially returning another tenant's cached connection without sufficient authorization checks
Why this happens
The underlying issue is an authorization decision based on an identifier that is not unique across tenant boundaries. When a connection cache is keyed only by a source ID, a caller-controlled or reused ID may resolve to another tenant's cached connection. This maps to CWE-639: Authorization Bypass Through User-Controlled Key, where access control fails to properly validate the relationship between a requested key and the caller's authority.
Potential impact
- An attacker may be able to discover another tenant's database schema.
- An attacker could read records from the victim's external database.
- An attacker could update or insert records without the victim tenant's authorization.
- Cross-tenant data integrity and confidentiality may be compromised.
General mitigation guidance
Defensive design generally focuses on binding resource lookup and connection reuse to verified tenant ownership.
- Include tenant identity and other authorization-relevant context in cache keys.
- Re-check source ownership and permissions when creating a source and before database operations.
- Treat client-supplied identifiers as references to validate, not as proof of authorization.
- Prefer tenant-scoped resource lookup and secure-by-default connection handling.
- Limit database credentials and permissions to the minimum required for each tenant or workload.
How teams detect issues like this
Review source creation and connection lookup paths for authorization checks that rely on identifiers without confirming tenant ownership.
- Use static analysis or code review rules to flag cache keys that omit tenant or ownership context.
- Test cross-tenant access controls for source creation, schema discovery, and record operations.
- Monitor audit logs for source IDs accessed by accounts outside the owning tenant.
- Enforce policies requiring tenant-scoped authorization checks before cached resources are returned.

