CVE-2026-81637: CWE-613 Insufficient Session Expiration in team-alembic ash_authentication
Insufficient Session Expiration vulnerability in team-alembic AshAuthentication allows an attacker who obtains a victim's OAuth2 state value to replay the callback and sign that victim into an attacker-controlled account. AshAuthentication.Strategy.OAuth2.Plug.callback/2 clears the stored session_params through a rebinding step inside its with chain, conn <- delete_session(conn, session_key). Elixir evaluates the else block in the scope enclosing the with, so every failure path (the provider returning ?error=access_denied, an invalid code, a token-exchange error, or a registration or sign-in failure) reaches store_authentication_result/2 holding the original connection and the session entry is never removed. The value the module's own comment describes as protection against a CSRF-related attack is therefore consumed only when authentication succeeds, and survives a cancelled or failed attempt until the next request phase or session expiry. This issue affects ash_authentication: from 0.6.0 before 4.15.0 and from 5.0.0-rc.0 before 5.0.0-rc.14.
AI Analysis
Technical Summary
The vulnerability in ash_authentication's OAuth2 callback handling is due to improper session expiration management. Specifically, the session_params used to protect against CSRF are deleted only on successful authentication. If the authentication fails or is cancelled, the session_params remain intact, allowing an attacker who has obtained the victim's OAuth2 state value to replay the callback and cause the victim to be signed into an attacker-controlled account. This flaw affects versions >=0.6.0 <4.15.0 and >=5.0.0-rc.0 <5.0.0-rc.14 of ash_authentication. The CVSS 4.0 vector indicates network attack vector, high attack complexity, partial attack and impact requirements, and low confidentiality and integrity impact.
Potential Impact
An attacker who obtains a victim's OAuth2 state value can replay the callback to sign the victim into an attacker-controlled account. This could lead to session confusion or account misbinding but does not directly disclose sensitive information or allow privilege escalation. The overall impact is low severity as reflected by the CVSS score of 2.3.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided in the available data. Until a fix is available, avoid relying solely on the OAuth2 state value for session security and consider additional session management controls. Monitor vendor advisories for updates and apply patches once released.
CVE-2026-81637: CWE-613 Insufficient Session Expiration in team-alembic ash_authentication
Description
Insufficient Session Expiration vulnerability in team-alembic AshAuthentication allows an attacker who obtains a victim's OAuth2 state value to replay the callback and sign that victim into an attacker-controlled account. AshAuthentication.Strategy.OAuth2.Plug.callback/2 clears the stored session_params through a rebinding step inside its with chain, conn <- delete_session(conn, session_key). Elixir evaluates the else block in the scope enclosing the with, so every failure path (the provider returning ?error=access_denied, an invalid code, a token-exchange error, or a registration or sign-in failure) reaches store_authentication_result/2 holding the original connection and the session entry is never removed. The value the module's own comment describes as protection against a CSRF-related attack is therefore consumed only when authentication succeeds, and survives a cancelled or failed attempt until the next request phase or session expiry. This issue affects ash_authentication: from 0.6.0 before 4.15.0 and from 5.0.0-rc.0 before 5.0.0-rc.14.
CVSS v4.0
Score 2.3low
Affected software
team-alembic
ash_authentication
team-alembic
ash_authentication
pkg:hex/ash_authenticationpkg:github/team-alembic/ash_authenticationcpe:2.3:a:team-alembic:ash_authentication:*:*:*:*:*:*:*:*Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in ash_authentication's OAuth2 callback handling is due to improper session expiration management. Specifically, the session_params used to protect against CSRF are deleted only on successful authentication. If the authentication fails or is cancelled, the session_params remain intact, allowing an attacker who has obtained the victim's OAuth2 state value to replay the callback and cause the victim to be signed into an attacker-controlled account. This flaw affects versions >=0.6.0 <4.15.0 and >=5.0.0-rc.0 <5.0.0-rc.14 of ash_authentication. The CVSS 4.0 vector indicates network attack vector, high attack complexity, partial attack and impact requirements, and low confidentiality and integrity impact.
Potential Impact
An attacker who obtains a victim's OAuth2 state value can replay the callback to sign the victim into an attacker-controlled account. This could lead to session confusion or account misbinding but does not directly disclose sensitive information or allow privilege escalation. The overall impact is low severity as reflected by the CVSS score of 2.3.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided in the available data. Until a fix is available, avoid relying solely on the OAuth2 state value for session security and consider additional session management controls. Monitor vendor advisories for updates and apply patches once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-09-11T18:15:01.808Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6aabe86855bf5e2cf56c51c0
Added to database: 09/17/2026, 13:17:28 UTC
Last enriched: 09/17/2026, 13:32:20 UTC
Last updated: 09/18/2026, 00:43:07 UTC
Views: 9
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.