CVE-2026-49757: OAuth2/OIDC account takeover in AshAuthentication via email-based user matching

Published Jun 15, 2026
·
Updated

Summary

Authentication Bypass by Spoofing vulnerability in team-alembic AshAuthentication allows account takeover of local users via OAuth2/OIDC sign-in.

AshAuthentication's OAuth2 and OIDC family strategies matched the local user by email address (an upsert on the email field, or a user-defined sign-in filter) rather than by the OpenID Connect iss/sub claim combination. Per OpenID Connect Core §5.7, only iss/sub uniquely and stably identifies an end-user; other claims, including email, MUST NOT be used as unique identifiers.

A provider login presenting a victim's email, including an unverified email, a reused email, or an account with emailverified: false, resolved to and signed in as the victim's existing local account. An unauthenticated attacker who can register an account on any accepted OAuth provider with the victim's email (or who benefits from provider-side email reuse or reclamation) obtains the victim's full local privileges.

The fix resolves users by the (strategy, sub) identity stored in a user identity resource, and only links a new sub to an existing local account by email when the provider's emailverified claim is trusted (trustemailverified?).

This issue affects ashauthentication: from 0.6.0 before 4.14.0 and from 5.0.0-rc.0 before 5.0.0-rc.10.

Other sources

Summary

AshAuthentication's OAuth2 and OIDC family strategies matched the local user by email address rather than by the OpenID Connect iss/sub claim combination. A provider login presenting a victim's email (including an unverified, reused, or emailverified: false account) resolved to and signed in as the victim's existing local account. An unauthenticated attacker who can register an account on any accepted OAuth provider with the victim's email obtains the victim's full local privileges.

Details

Per OpenID Connect Core §5.7, only the iss/sub claim combination uniquely and stably identifies an end-user; any other claim, including email, MUST NOT be used as a unique identifier. AshAuthentication's OAuth2/OIDC register flow nonetheless drove the upsert by the email field (upsertidentity on email, or a user-defined sign-in filter), and the sign-in preparation filtered users by email.

1. Provider login. The attacker signs in to a configured OAuth/OIDC provider with the victim's email. This is trivial for providers that don't verify email ownership, and possible under email-reuse / reclamation for providers that do.

2. AshAuthentication register step. 'Elixir.AshAuthentication.Strategy.OAuth2.IdentityChange':change/3 invokes the upsert action whose upsertidentity resolves on the email. The action lands on the victim's existing record.

3. Sign-in preparation. 'Elixir.AshAuthentication.Strategy.OAuth2.SignInPreparation':prepare/3 does not verify the returned user against an iss/sub identity, so the attacker is authenticated as the victim.

Configurations

Exploitation requires one of:

The configured OAuth/OIDC provider does not reliably verify email ownership (lets a user register with any email, or fails to verify it). Many social/enterprise providers fall into this category, including Slack, generic OIDC deployments, and any custom OAuth2 endpoint without strict email validation. The provider allows email reclamation: the victim's email becomes available on the provider (account deletion, organisation off-boarding, mail-host change) and the attacker registers it. The attacker then signs in via that provider and takes over the local account.

Providers that strictly verify email ownership and forbid reuse (e.g. modern Google Workspace, GitHub for accounts that have completed verification) are not directly exploitable, but applications that accept any of the affected strategy types in addition are still exposed via the weaker providers in the set.

PoC

1. On any accepted OAuth/OIDC provider, register an account whose email is the victim's email (or use a provider that allows email reuse). 2. Complete the standard OAuth flow against the AshAuthentication application. 3. The application's upsert resolves on email, signs the attacker in as the victim, and returns a session token for the victim's account.

Impact

Unauthenticated remote account takeover against any AshAuthentication-using application that exposes an OAuth2/OIDC strategy. The default configuration of every affected strategy is vulnerable; no application-level misconfiguration is required. An attacker who succeeds gains the victim's full local identity, with read, write, and destructive access to whatever the victim's account can do.

References

Introduction commit: https://github.com/team-alembic/ashauthentication/commit/c5f589058e04239263f50a1430eb17ea6d5dd1a2 Patch commit (4.x backport): https://github.com/team-alembic/ashauthentication/commit/728b8d28c1b5f465fa1116ef044a815300fc733d Patch commit (5.x): https://github.com/team-alembic/ashauthentication/commit/64530644f9b37ebb76ca14aeb83a77597a0034b7

— GitHub

Authentication Bypass by Spoofing vulnerability in team-alembic AshAuthentication allows account takeover of local users via OAuth2/OIDC sign-in.

AshAuthentication's OAuth2 and OIDC family strategies matched the local user by email address (an upsert on the email field, or a user-defined sign-in filter) rather than by the OpenID Connect iss/sub claim combination. Per OpenID Connect Core §5.7, only iss/sub uniquely and stably identifies an end-user; other claims, including email, MUST NOT be used as unique identifiers.

A provider login presenting a victim's email, including an unverified email, a reused email, or an account with emailverified: false, resolved to and signed in as the victim's existing local account. An unauthenticated attacker who can register an account on any accepted OAuth provider with the victim's email (or who benefits from provider-side email reuse or reclamation) obtains the victim's full local privileges.

The fix resolves users by the (strategy, sub) identity stored in a user identity resource, and only links a new sub to an existing local account by email when the provider's emailverified claim is trusted (trustemailverified?).

This issue affects ashauthentication from 0.1.0 before 4.14.0 and from 5.0.0-rc.0 before 5.0.0-rc.10.

— NVD

Authentication Bypass by Spoofing vulnerability in team-alembic AshAuthentication allows account takeover of local users via OAuth2/OIDC sign-in.

AshAuthentication's OAuth2 and OIDC family strategies matched the local user by email address (an upsert on the email field, or a user-defined sign-in filter) rather than by the OpenID Connect iss/sub claim combination. Per OpenID Connect Core §5.7, only iss/sub uniquely and stably identifies an end-user; other claims, including email, MUST NOT be used as unique identifiers.

A provider login presenting a victim's email, including an unverified email, a reused email, or an account with emailverified: false, resolved to and signed in as the victim's existing local account. An unauthenticated attacker who can register an account on any accepted OAuth provider with the victim's email (or who benefits from provider-side email reuse or reclamation) obtains the victim's full local privileges.

The fix resolves users by the (strategy, sub) identity stored in a user identity resource, and only links a new sub to an existing local account by email when the provider's emailverified claim is trusted (trustemailverified?).

This issue affects ashauthentication: from 0.6.0 before 4.14.0 and from 5.0.0-rc.0 before 5.0.0-rc.10.

— MITRE

Affected Software

4 affected componentsFixes available
hex/ash_authentication>=0.1.0<4.14.0, >=5.0.0-rc.0<5.0.0-rc.10
erlang/ash_authentication>=5.0.0-rc.0<5.0.0-rc.10
5.0.0-rc.10
erlang/ash_authentication>=0.1.0<4.14.0
4.14.0
erlang/ash_authentication>=0.6.0<4.14.0
4.14.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade erlang/ash_authentication to a version that resolves this vulnerability.

    Fixed in 5.0.0-rc.10
  2. Upgrade

    Upgrade erlang/ash_authentication to a version that resolves this vulnerability.

    Fixed in 4.14.0
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 4.14.0
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 5.0.0-rc.10

Event History

Jun 15, 2026
CVE Published
via MITRE·10:07 AM
Data Sourced
via MITRE·10:07 AM
DescriptionWeakness
Data Sourced
via OSV·10:07 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·12:16 PM
DescriptionSeverityWeakness
Exploit Published
via CISA·12:35 PM
Aug 25, 2026
Advisory Published
via GitHub·06:20 PM
Data Sourced
via GitHub·06:20 PM
DescriptionWeaknessAffected Software
Nov 20, 2026
Updated
via MITRE·08:46 AM
Description
Data Sourced
via OSV·09:00 AM
Affected Software
Updated
via NVD·09:20 AM
Description
Updated
via OSV·10:00 AM
Description

Frequently Asked Questions

1

What is the severity of CVE-2026-49757?

CVE-2026-49757 has a critical severity score of 9.2 according to the CVSS.

2

How do I fix CVE-2026-49757?

To fix CVE-2026-49757, ensure that user identification is not solely based on email addresses, and implement stricter verification mechanisms.

3

What type of vulnerability is CVE-2026-49757?

CVE-2026-49757 is an Authentication Bypass by Spoofing vulnerability found in AshAuthentication.

4

Who is affected by CVE-2026-49757?

Local users of the AshAuthentication software who utilize OAuth2/OIDC sign-in are affected by CVE-2026-49757.

5

What can attackers do with CVE-2026-49757?

Attackers can exploit CVE-2026-49757 to take over accounts by spoofing authentication based on email matching.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203