Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain leaked single-use magic-link token
-
DeliveryFire concurrent sign-in requests with same token
-
ExploitRace verify-before-revoke window
-
ExecutionMultiple redemptions each pass JWT check
-
PersistReceive full user token as target
-
ImpactAuthenticated account takeover
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture TOCTOU prevention
|
| Exploitation Conditions | Exploitation requires all of the following: (1) the magic-link strategy is in use with single_use_token? enabled - which the description states is the DEFAULT configuration; (2) the attacker possesses a valid, unexpired, not-yet-consumed magic-link JWT for the target subject (token leakage is the essential precondition, not modeled in PR); and (3) the attacker must win a timing race by submitting concurrent sign-in redemptions inside the window between Jwt.verify/4 and the after_action/after_transaction revocation, which is written as an idempotent upsert and therefore never forces a conflict. Limiting factors: the race is non-deterministic (reflected as AT:P / my AC:H), the token must be obtained out-of-band and used before natural expiry, and only Ash applications using magic-link auth on the affected versions are exposed. No end-user interaction beyond the attacker's own requests is needed once a token is held. |
| Impact | This is a genuine but conditional vulnerability whose real-world risk is materially lower than its headline 9.1 (CVSS 4.0) suggests. The vendor vector CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N encodes the key nuance itself: the AT:P (Attack Requirements: Present) metric reflects that success depends on winning a non-deterministic race condition (CWE-367), and exploitation is impossible without first obtaining a valid, unexpired, unredeemed magic-link token - a precondition the base vector does NOT model as PR/UI but which sharply limits practical attack windows. There is NO EPSS score, NO CISA KEV listing, and NO public exploit code identified at time of analysis, so all signals point to no-public-exploit-identified rather than active exploitation. The attacker must already hold a leaked single-use token AND fire concurrent redemptions to beat the verify-before-revoke window; this is opportunistic, not scalable, and not internet-wide sprayable. Contrast: the vendor treats confidentiality and integrity as High (full account takeover / user token issuance), which is defensible for a successful exploit, but the compound preconditions (token leakage + race win) mean I assess AC:H and real-world severity closer to ~7 than 9.1. This is a fix-in-normal-patch-cycle item for Elixir/Ash shops using magic-link auth, not a drop-everything emergency, absent evidence of targeting. |
| Exploit ScenarioDerived | An attacker intercepts or otherwise obtains a target's single-use magic-link token (e.g., via email forwarding, shared inbox, proxy logs, or referrer leakage) and, before or as the legitimate user redeems it, fires many concurrent sign-in requests carrying that same token. Because Jwt.verify/4 runs before revocation and TokenResource revocation is an idempotent upsert, multiple concurrent redemptions all pass verification and each returns a full user token, giving the attacker an authenticated session as the target. No public exploit code exists, and success requires winning a timing race against the revocation write. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Reusing a leaked single-use magic-link token is possible in the Elixir library ash_authentication because its validity check and its revocation are not serialised: concurrent sign-in redemptions of the same token can all succeed, each returning a full user JWT and authenticating the attacker as the target subject. Affected are ash_authentication versions from 3.9.0 before 4.15.0 and 5.0.0-rc.0 before 5.0.0-rc.14, with single_use_token? enabled (the default) - unauthenticated remote requests (PR:N) qualify, but the attacker must already possess a valid, unexpired magic link obtained out-of-band and must win a non-deterministic timing race, so real-world risk is materially lower than the headline CVSS 4.0 score of 9.1 suggests. There is no indication of confirmed active exploitation (no CISA KEV entry) and no public exploit identified at time of analysis; vendor patches are available.
RemediationAI
Vendor-released patch: upgrade ash_authentication to 4.15.0 on the 4.x line, or to 5.0.0-rc.14 on the 5.0 release-candidate line; the associated upstream changes are the commits cf3d227ef25912cf1b0c5fa80f20001f5c46a102, 18dfdb36c14aa6a61df8572bce2d5ec36b1d9840 and 9ef6864b8833d3b795427a7b8dc518a4997d41ab, with details in advisory GHSA-23gr-vcp4-r27q. Where an immediate upgrade is not possible, compensating controls are to disable the magic-link strategy entirely (removes that login path, forcing users onto password or OAuth flows) or, if it must stay enabled, to shorten magic-link token lifetimes and add upstream rate limiting or serialisation so that concurrent sign-in requests bearing the same token are rejected or queued - the trade-off being added latency for legitimate single requests and no cryptographic guarantee, since the race window between Jwt.verify/4 and the after_action/after_transaction revocation remains open until the fix is applied. Because the essential precondition is token leakage, also treat any exposed magic-link URL (email logs, proxies, referrer headers) as compromised and invalidate outstanding tokens where the implementation allows it.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The issue is a classic time-of-check/time-of-use (TOCTOU) race, CWE-367, in the magic-link strategy of the Ash framework's authentication library. Sign-in with a magic link first verifies the submitted JWT via AshAuthentication.Jwt.verify/4, and only afterwards revokes it: AshAuthentication.Strategy.MagicLink.SignInPreparation performs the revocation inside a Query.after_action callback, while AshAuthentication.Strategy.MagicLink.SignInChange does it in an after_transaction hook that runs after the sign-in has already committed. Because AshAuthentication.TokenResource.Actions.revoke/3 writes the revocation as an idempotent upsert, a duplicate concurrent revocation silently succeeds rather than raising a conflict, so no request ever loses the check-versus-consume race. Nothing in the flow atomically marks the token consumed before issuing the user token, meaning N simultaneous redemptions of one single-use token can each mint a valid session token for the same subject. Relevant supporting code lives in AshAuthentication.Jwt (token purpose handling), the magic-link strategy module, and the token resource actions; the upstream advisory is GHSA-23gr-vcp4-r27q, published via Erlef (EEF) as EEF-CVE-2026-82761 and mirrored on OSV.
Know when Ash Authentication gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Network-exploitable with no auth (PR:N) and no victim interaction, but AC:H because success requires holding a leaked token and winning a non-deterministic revocation race; account takeover yields C:H/I:H, no availability impact.
Primary rating from Vendor (EEF).
CVSS VectorVendor: EEF
DescriptionCVE.org
Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability in team-alembic AshAuthentication allows an attacker holding a leaked magic link to replay its single-use token and authenticate as the target subject. A magic link configured with single_use_token?, which is the default, is meant to be redeemable exactly once, but nothing serialises the token's validity check against its consumption, so concurrent redemptions of one token all succeed and each yields a full user token.
Sign-in verifies the JWT with Jwt.verify/4 and revokes it only afterwards: AshAuthentication.Strategy.MagicLink.SignInPreparation revokes in a Query.after_action callback, and AshAuthentication.Strategy.MagicLink.SignInChange in an after_transaction hook that runs once the sign-in has already committed. AshAuthentication.TokenResource.Actions.revoke/3 writes the revocation as an upsert, so a concurrent duplicate revocation silently succeeds instead of conflicting and no request ever loses the race.
This issue affects ash_authentication: from 3.9.0 before 4.15.0 and from 5.0.0-rc.0 before 5.0.0-rc.14.
Technical POC Analysis
CWE-367 TOCTOU.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A critical race condition in the Elixir ash_authentication library can let an attacker who already possesses a valid magic-link token redeem it concurrently and obtain the target user's session, undermining the intended single-use protection in affected applications. The practical risk is limited because exploitation requires out-of-band token possession and a non-deterministic timing race, and there is no CISA KEV entry or public exploit identified at time of analysis. Leadership should still prioritize remediation because affected authentication flows can lead to account takeover and unauthorized access to user or administrative data.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
More in Ash Authentication
View allAccount takeover in team-alembic AshAuthentication (0.1.0 to <4.14.0 and 5.0.0-rc.0 to <5.0.0-rc.10) lets an unauthentic
Ash Authentication is an authentication framework for Elixir applications. Rated medium severity (CVSS 6.3), this vulner
Revoked sessions continue to be treated as fully authenticated on affected AshAuthentication and AshAuthentication Phoen
Unconfirmed accounts can obtain an authenticated session in the AshAuthentication Elixir library, defeating the mandator
Account takeover in AshAuthentication (Elixir/Ash) 4.14.0 through 4.14.x and 5.0.0-rc.10 through 5.0.0-rc.13 lets unauth
Authentication bypass in the Elixir library ash_authentication lets an attacker who operates one federated identity-prov
Denial of service in the AshAuthentication API-key sign-in strategy lets an unauthenticated, remote attacker exhaust ser
An authenticated account-takeover primitive exists in the Elixir library AshAuthentication (ash_authentication) versions
JWT token replay in AshAuthentication exposes any application using the stateless bearer-token path to full account take
An authenticated account holder can bind a TOTP authenticator secret they control onto another user's account in AshAuth
Authentication bypass in the AshAuthentication library for Elixir/Ash lets an authenticated attacker who holds a valid s
Password sign-in in AshAuthentication Phoenix (ash_authentication_phoenix 1.7.0 to <2.17.4 and 3.0.0-rc.0 to <3.0.0-rc.1
EUVD-2026-81480
NVD
CVE.org
EPSS
GitHub
Exploit-DB