Replayable OAuth2 CSRF state retained after a failed callback in AshAuthentication
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- High
- Attack requirements
- Present
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-613.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| team-alembic | ash_authentication | 0.6.0 to before 4.15.0; 5.0.0-rc.0 to before 5.0.0-rc.14 | 4.15.0, 5.0.0-rc.14 | Patch available | CNA |
- ash_authentication Vendorteam-alembic Affected 0.6.0 to before 4.15.0; 5.0.0-rc.0 to before 5.0.0-rc.14 Fixed in 4.15.0, 5.0.0-rc.14 Patch available CNA
CPE names CNA · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:team-alembic:ash_authentication:*:*:*:*:*:*:*:* | — | — | — |
- cpe:2.3:a:team-alembic:ash_authentication:*:*:*:*:*:*:*:* Versions — — ·—
Remediation
- Fix · CNA ash_authentication (team-alembic) Fixed in 4.15.0, 5.0.0-rc.14
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
team-alembic ash_authentication 4.15.0, 5.0.0-rc.14
14 records Highest priority Priority MEDIUM 5 MEDIUM, 9 LOW
Other records, highest priority first
- TI-2026-59214 Revoked session accepted because the session jti is never checked in AshAuthentication and AshAuthentication PhoenixPriority MEDIUM 49
- TI-2026-58664 `require_confirmed_with` is not enforced on the action and fails open on an unreadable attribute in AshAuthenticationPriority MEDIUM 49
- TI-2026-53751 Remember-me sign-in guard reads a session key that is never written in ash_authentication, allowing session replacementPriority MEDIUM 49
Timeline
- 2026-10-02 Threatist record created from CVE-2026-81637
References
Patch 2
Advisory 1
More team-alembic vulnerabilities
- TI-2026-36668 OAuth2/OIDC account takeover in AshAuthentication via email-based user matching CVSS 4.0CRITICAL 9.2
- TI-2026-46782 Purpose-limited JWT accepted as full bearer authentication in AshAuthentication CVSS 4.0HIGH 7.6
- TI-2026-59214 Revoked session accepted because the session jti is never checked in AshAuthentication and AshAuthentication Phoenix CVSS 4.0CRITICAL 9.1
- TI-2026-58664 `require_confirmed_with` is not enforced on the action and fails open on an unreadable attribute in AshAuthentication CVSS 4.0CRITICAL 9.1
- TI-2026-53751 Remember-me sign-in guard reads a session key that is never written in ash_authentication, allowing session replacement CVSS 4.0CRITICAL 9.1
- TI-2026-57079 Magic link single-use tokens replayable via TOCTOU race in AshAuthentication CVSS 4.0CRITICAL 9.1
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences