Summary
A flaw in SuperTokens Core's multitenancy authorization checks can let a valid application API key update settings beyond that application's permitted scope. In qualifying licensed multi-tenant deployments, this can expose sibling applications; a separate base-tenant path can let requests without an identifier change authentication settings.
Affected context
The issue affects SuperTokens Core multitenant deployments using the affected create-or-update handlers. The higher-impact parent-domain scenario requires multiple applications under one non-default connection URI domain, separate API keys, and an attacker with a valid key for one application. A distinct base-tenant scenario occurs when the optional identifier is omitted; that path can bypass permission and enterprise-feature checks for certain settings, but does not establish key theft or allow changes to coreConfig.
Exploit preconditions
- Attack surface: SuperTokens Core's multitenancy create-or-update API handlers.
- Required access: A valid API key for one application for the parent-domain scenario; the base-tenant path is triggered by a request that omits the optional identifier.
- Deployment conditions: The parent-domain scenario requires a licensed multi-tenant deployment with multiple applications under one non-default connection URI domain and separate API keys.
- Trigger point: An update targeting the parent domain, or a create-or-update request targeting the base tenant by omitting the identifier.
- Why exploitation is possible: Authorization checks do not adequately constrain parent-domain updates to a public source application and tenant; the base-tenant target skips relevant permission branches and the enterprise-feature gate.
Why this happens
The authorization logic does not consistently bind an update target to the caller's authorized application and tenant. In the parent-domain branch, the target domain is checked without the required public-source constraints, allowing an application API key to affect a broader scope. In the base-tenant case, omitting the optional identifier leads to a target that bypasses permission branches and an enterprise-feature gate. These are authorization enforcement failures, mapping primarily to CWE-863: Incorrect Authorization; the ability to affect resources through a caller-controlled target also relates to CWE-639.
Potential impact
- An attacker with the required application API key may be able to replace the parent-domain API key and then alter sibling application keys.
- Sibling application users may be exposed to unauthorized reading or modification.
- An attacker may be able to obtain sessions as sibling users or establish persistence through a sibling dashboard user.
- A sibling application may be locked out when its key is replaced.
- Base-tenant updates may change first factors, required secondary factors, or recipe-enabled flags, potentially disrupting login integrity or availability.
General mitigation guidance
Defensive approaches center on enforcing authorization against the complete target scope before applying any update.
- Bind each operation to the authenticated application's permitted tenant and domain, and explicitly authorize parent-scope changes.
- Apply permission checks and feature-entitlement checks consistently to base-tenant and identified-tenant targets.
- Treat omitted identifiers as an explicit, well-defined target rather than allowing them to bypass authorization logic.
- Limit API-key scope and privileges, protect key changes with narrowly scoped controls, and monitor administrative configuration changes.
- Validate requested changes against an explicit allowlist and preserve least privilege for applications and operators.
How teams detect issues like this
- Review authorization branches for inconsistent checks across parent-domain, base-tenant, and identified-tenant targets.
- Use static analysis or targeted code review to trace caller identity and API-key scope through create-or-update handlers to each modified resource.
- Test requests with omitted identifiers and cross-application targets, including checks that permission and feature gates apply on every path.
- Enforce policy checks in CI for tenant-boundary invariants, and monitor for unexpected changes to domain settings, API keys, factors, and recipe flags.

