CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-49757

CVE-2026-49757: Authentication Bypass and Account Takeover in ash_authentication OAuth2/OIDC

Alon Barad
Alon Barad
Software Engineer

Aug 26, 2026·6 min read·37 visits

Executive Summary (TL;DR)

Unauthenticated remote account takeover via federated login using unverified email claims in the AshAuthentication Elixir library.

An authentication bypass and account takeover vulnerability in the AshAuthentication Elixir library (developed by team-alembic) allows unauthenticated remote attackers to compromise local accounts. By relying on mutable and unverified email claims instead of stable cryptographic issuer and subject pairings during OAuth2 and OIDC federated login flows, the application fails to validate the trust boundary of the incoming session.

Vulnerability Overview

The ash_authentication library is a critical component within the Elixir ecosystem, facilitating secure registration, sign-in, and session management for Ash-based applications. It abstracts integration with third-party federated identity systems through standard OAuth2 and OpenID Connect (OIDC) protocols. This abstraction minimizes custom implementation logic but introduces strict dependencies on the configuration of federated mappings.

In affected versions, the library allows identity resolving mechanisms to bypass proper cryptographic identifier mapping. Instead of requiring structured mapping using the standard issuer and subject identifiers, the identity verification process falls back to testing and matching user records directly through mutable claims like email addresses. This configuration default widens the exposed attack surface.

The vulnerability is categorized under CWE-290 (Authentication Bypass by Spoofing). It poses a direct threat to application trust boundaries by permitting unauthenticated actors to bypass password challenges or secondary factor prompts when matching specific local email profiles.

Root Cause Analysis

The fundamental design weakness stems from a direct violation of the OpenID Connect Core specification. Section 5.7 explicitly mandates that the combination of the Issuer (iss) and Subject (sub) claims uniquely and stably identifies an end-user. Conversely, mutable attributes such as the email claim are explicitly declared unsafe for identity verification due to their susceptibility to re-assignment and spoofing.

In vulnerable versions of ash_authentication, the resolution logic failed to mandate an intermediate storage layer. This missing layer, the identity_resource, is responsible for mapping the unique provider identity (strategy, uid) to a local database user identifier. When this resource was omitted, the application fell back to looking up local users directly via incoming claim data.

Consequently, when an unauthenticated actor attempts to log in via an external OAuth provider that allows registering unverified email addresses, the provider issues a token containing the target victim's email. The target application consumes this claim, conducts a database query based solely on the email, matches the victim's record, and instantly initiates an active authenticated session without validating the origin identity.

Code-Level Analysis

The technical flaw exists in how OAuth2 callbacks are handled inside the identity change pipeline. Specifically, within Elixir.AshAuthentication.Strategy.OAuth2.IdentityChange, the user ID value was processed and assigned to changesets using dynamic key interpolation syntax.

# Vulnerable Syntax
UserIdentity.Actions.upsert(strategy.identity_resource, %{
  user_info: Changeset.get_argument(changeset, :user_info),
  oauth_tokens: Changeset.get_argument(changeset, :oauth_tokens),
  strategy: Strategy.name(strategy),
  "#{user_id_attribute_name}": user.id
})

The syntax "#{user_id_attribute_name}": evaluates the dynamic key as a String type in Elixir. However, the Ash Framework database layers rely on Atom keys to bind attributes to model schemas. When evaluated as a string, the framework fails to resolve this parameter as a valid foreign key, preventing proper persistence of the identity record.

The patch replaces this structure using native Elixir map-arrow syntax to maintain dynamic key types:

# Patched Syntax
UserIdentity.Actions.upsert(
  strategy.identity_resource,
  %{
    user_id_attribute_name => user.id,
    user_info: Changeset.get_argument(changeset, :user_info),
    oauth_tokens: Changeset.get_argument(changeset, :oauth_tokens),
    strategy: Strategy.name(strategy)
  },
  opts
)

By leveraging the user_id_attribute_name => user.id syntax, the dynamic key's structural type is correctly preserved as an Atom. This ensures the Ash data layer processes the database operation successfully, mapping the unique identity constraint without configuration loss.

Exploitation Methodology

Exploitation relies on an external identity provider that allows arbitrary email selection without strict ownership verification, or on administrative control over a custom OIDC server. An attacker targets an application known to run a vulnerable release of ash_authentication.

First, the attacker registers an account on the weak external identity provider using the email address of the victim's target local account. Second, the attacker visits the target application and initiates an authentication flow using the weak provider. The target application redirects the attacker to the provider for authorization.

Third, the provider returns an identity token verifying the user profile and transmitting the target email. The callback controller processes the token, queries the user database solely by the email claim, and finds the existing local account. The system registers a successful session, returning a valid authentication cookie or JSON Web Token representing the victim's profile to the attacker. This process is validated in the public proof-of-concept repository: https://github.com/Hunt-Benito/ash-authentication-oauth2-oidc-account-takeover-cve-2026-49757-email-based-user-matching.

Impact Assessment

A successful exploit results in total compromise of the confidentiality, integrity, and availability of the hijacked user account. If the target profile holds administrative privileges within the organization, the attacker obtains complete control over tenant resources, database schemas, and administrative panels.

The CVSS 4.0 base score is calculated at 9.2 (Critical), with 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. This score reflects that network exposure is direct and requires no privileges or user interaction. The attack requirements parameter is flagged as present, as exploitation is contingent on the victim's email being registered inside the target database and the target app accepting federated logins from a weak provider.

While active exploitation has not been observed in wild campaigns, the exposure of applications using generic OIDC providers remains serious. System administrators must assume that any configuration allowing generic, unverified provider integrations has a highly critical exploit exposure risk.

Remediation and Mitigation

Remediation requires upgrading the library and enforcing strict configuration limits. Developers must update their dependencies to 4.14.0 or higher (for the 4.x release line) or 5.0.0-rc.10 or higher (for the 5.x release line).

The patch changes the identity_resource from an optional parameters set to a strictly required parameter. To prevent connection failures, developers must create a user identity schema defining the unique mapping between user accounts and external identifiers. The database must then be migrated using mix ash.codegen and mix ash.migrate to enforce unique indexing across the (strategy, uid) fields.

Additionally, applications must configure verification trust flags. Specifically, setting trust_email_verified? to false prevents automatic email mapping from untrusted identity providers. The optional on_untrusted_email_match parameter can be configured to :reject or :confirm to require out-of-band validation via secure email verification links before federating accounts.

Official Patches

team-alembicOfficial AshAuthentication v4.14.0 release advisory.

Fix Analysis (2)

Technical Appendix

CVSS Score
9.2/ 10
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
EPSS Probability
0.61%
Top 53% most exploited

Affected Systems

ash_authentication (Elixir Package)

Affected Versions Detail

Product
Affected Versions
Fixed Version
ash_authentication
team-alembic
>= 0.1.0, < 4.14.04.14.0
ash_authentication
team-alembic
>= 5.0.0-rc.0, < 5.0.0-rc.105.0.0-rc.10
AttributeDetail
CWE IDCWE-290
Attack VectorNetwork (AV:N)
CVSS v4.09.2 (Critical)
Exploit StatusProof of Concept Available
ImpactAuthentication Bypass / Account Takeover
EPSS Score0.00615
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1556Modify Authentication Process
Credential Access
CWE-290
Authentication Bypass by Spoofing

The software receives input from an untrusted source and trusts that input as an assertion of a local user's identity without performing sufficient validation.

Known Exploits & Detection

GitHubProof of concept verifying authentication bypass via unverified email claims in OAuth2 flows.

Vulnerability Timeline

Vulnerability analyzed and patched in core repository.
2026-06-02
Official security releases v4.14.0 and v5.0.0-rc.10 published.
2026-06-14
Public advisory and CVE-2026-49757 identifier released.
2026-06-15

References & Sources

  • [1]GHSA-777c-2fxx-qr28 Security Advisory
  • [2]Erlang Ecosystem Foundation Advisory
  • [3]OSV Vulnerability Record
  • [4]NVD Vulnerability Details

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•3 days ago•CVE-2026-87697
8.8

CVE-2026-87697: Untrusted Deserialization in .NET PresentationCore Clipboard Handling

A remote code execution vulnerability exists in Microsoft .NET due to untrusted data deserialization within the PresentationCore component. The flaw stems from implicit auto-conversion flags during clipboard data retrieval operations.

Alon Barad
Alon Barad
20 views•5 min read
•3 days ago•CVE-2026-70007
8.8

CVE-2026-70007: Out-of-Bounds Write Vulnerability in .NET Framework and WPF Subsystem

An out-of-bounds write vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio allows unauthenticated remote attackers to execute arbitrary code via crafted pixel-shader bytecode or auto-converted clipboard payloads.

Amit Schendel
Amit Schendel
10 views•6 min read
•3 days ago•CVE-2026-70186
7.5

CVE-2026-70186: ASP.NET Core Denial of Service Vulnerability via Framework Deadlock

ASP.NET Core contains a thread deadlock vulnerability (CWE-833) that allows an unauthenticated remote attacker to cause a denial of service over the network by exhausting server thread pool resources.

Amit Schendel
Amit Schendel
10 views•5 min read
•3 days ago•CVE-2026-70035
8.8

CVE-2026-70035: Insecure Deserialization Remote Code Execution in Microsoft .NET Framework and .NET Runtime

CVE-2026-70035 is a high-severity Remote Code Execution (RCE) vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio caused by improper handling during the deserialization of untrusted data (CWE-502). An unauthenticated attacker can execute arbitrary code within the context of the affected process by delivering a crafted serialized payload.

Amit Schendel
Amit Schendel
15 views•6 min read
•3 days ago•CVE-2026-70183
7.5

CVE-2026-70183: Elevation of Privilege in ASP.NET Core and Visual Studio via Concurrent Race Condition

An elevation of privilege vulnerability exists in ASP.NET Core and Microsoft Visual Studio due to improper synchronization during concurrent thread execution. Authenticated remote attackers with low privileges can exploit a timing window to manipulate shared resources and assume higher-level execution contexts.

Alon Barad
Alon Barad
13 views•5 min read
•6 days ago•CVE-2026-107844
5.3

CVE-2026-107844: Path Traversal Vulnerability in Contao ImagesController

A path traversal vulnerability (CWE-22) in Contao CMS allows unauthenticated remote attackers to bypass directory boundary restrictions in ImagesController and access files within the project directory.

Amit Schendel
Amit Schendel
23 views•5 min read