Summary
CVE-2026-91039 is a critical authentication bypass vulnerability (CWE-290: Authentication Bypass by Spoofing) in the dynamic_oidc strategy of ash_authentication, an authentication framework for the Elixir Ash Framework. The flaw allows an attacker who controls one configured identity-provider (IdP) connection to be authenticated as a user who was provisioned through a completely different IdP connection, effectively enabling cross-tenant account takeover. The issue carries a CVSS score of 9.1 (Critical) and is remotely exploitable over the network with no authentication or user interaction required by the victim.
Technical details
- Root cause:
dynamic_oidcis designed to let an application register multiple identity-provider connections, each intended to occupy its own identity namespace. The runtime__connection_id__value is set on the ephemeral strategy struct at request time, but is never persisted through the identity-lookup/action pipeline — the strategy is re-fetched from the compile-time DSL definition during registration/sign-in, which drops the connection identifier. - Effect: Identity records end up keyed on the bare strategy name instead of a connection-specific namespaced variant, so subject (
sub) claims from every configured IdP connection resolve within a single shared identity namespace. - Trigger conditions: An application must configure the
dynamic_oidcstrategy with two or more identity-provider connections. An attacker who controls or can influence one of those connections (e.g., runs their own IdP tenant, or two IdPs happen to issue overlapping/sequentialsubvalues) can produce an identity that collides with a victim’s identity from another connection. - Attack vector: Network — no credentials, elevated privileges, or victim interaction are required. The attacker only needs the ability to complete an OIDC sign-in flow through a connection they control and to know or guess the victim’s subject identifier on the target connection.
- Impact: Full account takeover — the attacker is issued a valid session token for the victim’s account, gaining the victim’s complete privileges within the application. Confirmation add-ons only mitigate this for accounts that remain unconfirmed, and Ash’s multitenancy features only isolate identities in single-connection-per-tenant topologies, so most deployments using multiple connections are exposed.
Affected software
ash_authentication(team-alembic) versions >= 5.0.0-rc.10 and <= 5.0.0-rc.13, when thedynamic_oidcstrategy is configured with multiple identity-provider connections- The vulnerable identity-resolution machinery did not exist prior to 5.0.0-rc.10 (the
dynamic_oidcfeature itself was introduced around rc.9, prior to the flawed lookup logic)
Severity
- CVSS Score: 9.1 (Critical)
- Vector:
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N - CWE: CWE-290 (Authentication Bypass by Spoofing)
Mitigation and recommended actions
- Immediate: Upgrade
ash_authenticationto 5.0.0-rc.14 or later, which threads the runtime connection ID through the changeset/query context so identity lookups use namespaced strategy values instead of the bare strategy name. - Post-upgrade cleanup: Existing
UserIdentityrecords created under the vulnerable versions must be relinked from bare strategy names to their connection-namespaced equivalents — simply deleting these records is not sufficient because of how account matching is implemented. - If immediate patching is not possible: Restrict or disable the
dynamic_oidcstrategy to a single identity-provider connection per application/tenant to eliminate the shared-namespace collision path, and audit identity-provider subject (sub) claim sets out-of-band across all configured connections to detect accidental or malicious account merges. - Review authentication logs for sign-ins on
dynamic_oidcconnections where the resulting session was issued for an account that does not match the expected connection/tenant.

