{"id":"CVE-2026-49757","aliases":["CVE-2026-49757","GHSA-777c-2fxx-qr28","EEF-CVE-2026-49757"],"related":[],"kind":"vulnerability","state":"published","title":"OAuth2/OIDC account takeover in AshAuthentication via email-based user matching","summary":"Authentication Bypass by Spoofing vulnerability in team-alembic AshAuthentication allows account takeover of local users via OAuth2/OIDC sign-in.\n\nAshAuthentication'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.\n\nA provider login presenting a victim's email, including an unverified email, a reused email, or an account with email_verified: 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.\n\nThe 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 email_verified claim is trusted (trust_email_verified?).\n\nThis issue affects ash_authentication: from 0.6.0 before 4.14.0 and from 5.0.0-rc.0 before 5.0.0-rc.10.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Authentication Bypass by Spoofing vulnerability in team-alembic AshAuthentication allows account takeover of local users via OAuth2/OIDC sign-in.\n\nAshAuthentication'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.\n\nA provider login presenting a victim's email, including an unverified email, a reused email, or an account with email_verified: 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.\n\nThe 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 email_verified claim is trusted (trust_email_verified?).\n\nThis issue affects ash_authentication: from 0.6.0 before 4.14.0 and from 5.0.0-rc.0 before 5.0.0-rc.10.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nAshAuthentication'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 `email_verified: 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.\n\n### Details\n\nPer 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 (`upsert_identity` on email, or a user-defined sign-in filter), and the sign-in preparation filtered users by email.\n\n**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.\n\n**2. AshAuthentication register step.** `'Elixir.AshAuthentication.Strategy.OAuth2.IdentityChange':change/3` invokes the upsert action whose `upsert_identity` resolves on the email. The action lands on the victim's existing record.\n\n**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.\n\n#### Configurations\n\nExploitation requires one of:\n\n* 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.\n* 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.\n\nProviders 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.\n\n### PoC\n\n1. On any accepted OAuth/OIDC provider, register an account whose email is the victim's email (or use a provider that allows email reuse).\n2. Complete the standard OAuth flow against the AshAuthentication application.\n3. The application's upsert resolves on email, signs the attacker in as the victim, and returns a session token for the victim's account.\n\n### Impact\n\nUnauthenticated 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.\n\n## References\n\n* Introduction commit: https://github.com/team-alembic/ash_authentication/commit/c5f589058e04239263f50a1430eb17ea6d5dd1a2\n* Patch commit (4.x backport): https://github.com/team-alembic/ash_authentication/commit/728b8d28c1b5f465fa1116ef044a815300fc733d\n* Patch commit (5.x): https://github.com/team-alembic/ash_authentication/commit/64530644f9b37ebb76ca14aeb83a77597a0034b7","format":"markdown","source":"ghsa"},{"lang":"en","text":"## Summary\n\nAuthentication Bypass by Spoofing vulnerability in team-alembic AshAuthentication allows account takeover of local users via OAuth2/OIDC sign-in.\n\nAshAuthentication'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.\n\nA provider login presenting a victim's email, including an unverified email, a reused email, or an account with `email_verified: 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.\n\nThe 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 `email_verified` claim is trusted (`trust_email_verified?`).\n\nThis issue affects ash_authentication: from 0.6.0 before 4.14.0 and from 5.0.0-rc.0 before 5.0.0-rc.10.","format":"markdown","source":"eef"},{"lang":"es","text":"Una vulnerabilidad de omisión de autenticación por suplantación en team-alembic AshAuthentication permite la toma de control de cuentas de usuarios locales a través del inicio de sesión OAuth2/OIDC.\n\nLas estrategias de la familia OAuth2 y OIDC de AshAuthentication coincidían con el usuario local por dirección de correo electrónico (una operación de ’upsert’ en el campo de correo electrónico, o un filtro de inicio de sesión definido por el usuario) en lugar de por la combinación de reclamaciones iss/sub de OpenID Connect. Según OpenID Connect Core §5.7, solo iss/sub identifica de forma única y estable a un usuario final; otras reclamaciones, incluido el correo electrónico, NO DEBEN usarse como identificadores únicos.\n\nUn inicio de sesión de proveedor que presentaba el correo electrónico de una víctima, incluido un correo electrónico no verificado, un correo electrónico reutilizado o una cuenta con email_verified: false, se resolvió y se inició sesión como la cuenta local existente de la víctima. Un atacante no autenticado que puede registrar una cuenta en cualquier proveedor OAuth aceptado con el correo electrónico de la víctima (o que se beneficia de la reutilización o recuperación de correo electrónico por parte del proveedor) obtiene los privilegios locales completos de la víctima.\n\nLa solución resuelve a los usuarios por la identidad (estrategia, sub) almacenada en un recurso de identidad de usuario, y solo vincula un nuevo sub a una cuenta local existente por correo electrónico cuando la reclamación email_verified del proveedor es de confianza (¿trust_email_verified?).\n\nEste problema afecta a ash_authentication desde 0.1.0 antes de 4.14.0 y desde 5.0.0-rc.0 antes de 5.0.0-rc.10.","source":"nvd"}],"published":"2026-06-15T10:07:17.781Z","modified":"2026-11-25T17:23:13.864Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":9.2,"rating":"CRITICAL"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":9.2,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"CRITICAL"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"}],"cwes":["CWE-290"],"affected":[{"ranges":[{"type":"semver","introduced":"0.6.0","fixed":"4.14.0","status":"affected"},{"type":"semver","introduced":"5.0.0-rc.0","fixed":"5.0.0-rc.10","status":"affected"}],"vendor":"team-alembic","product":"ash_authentication","package":"ash_authentication","cpe":"cpe:2.3:a:team-alembic:ash_authentication:*:*:*:*:*:*:*:*","repo":"https://github.com/team-alembic/ash_authentication","source":"cvelist"},{"ranges":[{"type":"git","introduced":"c5f589058e04239263f50a1430eb17ea6d5dd1a2","fixed":"*","status":"affected"}],"vendor":"team-alembic","product":"ash_authentication","package":"team-alembic/ash_authentication","cpe":"cpe:2.3:a:team-alembic:ash_authentication:*:*:*:*:*:*:*:*","repo":"https://github.com/team-alembic/ash_authentication","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.1.0","status":"affected","fixed":"4.14.0"}],"ecosystem":"Hex","package":"ash_authentication","purl":"pkg:hex/ash_authentication","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"5.0.0-rc.0","status":"affected","fixed":"5.0.0-rc.10"}],"ecosystem":"Hex","package":"ash_authentication","purl":"pkg:hex/ash_authentication","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.6.0","status":"affected","fixed":"4.14.0"},{"type":"semver","introduced":"5.0.0-rc.0","status":"affected","fixed":"5.0.0-rc.10"}],"ecosystem":"Hex","package":"ash_authentication","purl":"pkg:hex/ash_authentication","source":"eef"},{"ranges":[{"type":"git","introduced":"c5f589058e04239263f50a1430eb17ea6d5dd1a2","status":"affected","fixed":"64530644f9b37ebb76ca14aeb83a77597a0034b7"},{"type":"git","status":"affected","fixed":"728b8d28c1b5f465fa1116ef044a815300fc733d"}],"repo":"https://github.com/team-alembic/ash_authentication","source":"eef"}],"references":[{"url":"https://github.com/team-alembic/ash_authentication/security/advisories/GHSA-777c-2fxx-qr28","tags":["advisory","related","vendor-advisory","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-49757.html","tags":["related","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-49757","tags":["related","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/team-alembic/ash_authentication/commit/c5f589058e04239263f50a1430eb17ea6d5dd1a2","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/team-alembic/ash_authentication/commit/64530644f9b37ebb76ca14aeb83a77597a0034b7","tags":["fix","patch","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://github.com/team-alembic/ash_authentication/commit/728b8d28c1b5f465fa1116ef044a815300fc733d","tags":["fix","patch","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49757","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/team-alembic/ash_authentication","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/team-alembic/ash_authentication/releases/tag/v4.14.0","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/team-alembic/ash_authentication/releases/tag/v5.0.0-rc.10","tags":["web"],"sources":["ghsa"]},{"url":"https://hex.pm/packages/ash_authentication","tags":["package"],"sources":["eef"]}],"credits":["Jarl André Hübenthal","Jonatan Männchen / EEF","James Harton"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2026-06-15T12:35:13.009Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-49757","url":"https://www.cve.org/CVERecord?id=CVE-2026-49757","licence":"CVE Terms of Use","modified":"2026-11-20T08:46:05.186Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-777c-2fxx-qr28","url":"https://github.com/advisories/GHSA-777c-2fxx-qr28","licence":"CC-BY-4.0","modified":"2026-08-26T01:21:17.625Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-49757","url":"https://osv.dev/vulnerability/EEF-CVE-2026-49757","licence":"CC-BY-4.0","modified":"2026-11-25T17:23:13.864Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-49757","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49757","licence":"Public domain","modified":"2026-11-20T09:20:12.970Z"}],"updatedAt":"2026-11-25T22:59:24.637Z","epss":{"score":0.0075,"percentile":0.56174,"date":"2026-12-01T12:00:22.000Z"}}