Summary
In Fider's multi-tenant mode, an email verification key issued by one tenant can be accepted to authenticate the same email address on another tenant. This can bypass tenant isolation and enable unauthorized cross-tenant account takeover.
Affected context
The issue affects Fider deployments configured for multi-tenant operation with HOST_MODE=multi before version 0.36.0. It involves validation of email verification keys across tenant boundaries; single-host deployments using HOST_MODE=single are not affected.
Exploit preconditions
- Attack surface: Fider's email verification and authentication flow in multi-tenant mode
- Required access: Ability to obtain or use a valid email verification key issued by one tenant
- Trigger point: Authentication of the same email address in another tenant
- Why exploitation is possible: The verification key is not sufficiently bound to the tenant context in which it was issued
Why this happens
The authentication flow accepts a verification key without adequately enforcing that it belongs to the tenant where it is used. This is an authorization issue consistent with CWE-639: Authorization Bypass Through User-Controlled Key: a key associated with one identity or context is accepted to access a resource in another context. In a multi-tenant application, verification credentials should be scoped to both the intended identity and tenant.
Potential impact
- An attacker may gain access to an account in another tenant
- Private feedback, suggestions, or account information could be exposed
- An attacker could make changes or submit content under the affected account
- Trust between tenants and confidence in tenant isolation could be undermined
General mitigation guidance
Defensive patterns focus on making authentication credentials tenant-scoped and validating authorization at every tenant boundary.
- Bind verification keys to the intended email address, tenant, and authentication purpose
- Reject keys when their tenant context does not match the active tenant
- Use short-lived, single-use verification credentials and invalidate them after use
- Apply secure-by-default tenant isolation checks throughout authentication and account lookup flows
- Minimize service privileges and restrict access to tenant-specific data
How teams detect issues like this
- Review authentication code for verification keys or tokens that are not bound to a tenant identifier
- Use static analysis and code review checks to flag authorization decisions based only on user-controlled identifiers or keys
- Test that credentials issued in one tenant cannot authenticate users in another tenant
- Enforce policies requiring tenant context to be checked during authentication and account access

