Skip to main content

CVE-2026-82761: CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition in team-alembic ash_authentication

0
Critical
VulnerabilityCVE-2026-82761cvecve-2026-82761cwe-367
Published: 09/17/2026 (09/17/2026, 13:09:01 UTC)
Source: CVE Database V5
Vendor/Project: team-alembic
Product: ash_authentication

Description

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.

CVSS v4.0

Score 9.1critical

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

team-alembic

ash_authentication

Affected versions
>=3.9.0 <4.15.0>=5.0.0-rc.0 <5.0.0-rc.14

team-alembic

ash_authentication

ash_authentication
pkg:hex/ash_authentication
Affected versions
>=3.9.0 <4.15.0>=5.0.0-rc.0 <5.0.0-rc.14
GitHub Actionsmore threats →cve
team-alembic/ash_authentication
pkg:github/team-alembic/ash_authentication
CPE configurations
cpe: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.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/17/2026, 13:31:40 UTC

Technical Analysis

The vulnerability in ash_authentication involves a TOCTOU race condition where the single-use magic link token can be redeemed multiple times concurrently. The sign-in process verifies the JWT token before revoking it, but the revocation occurs asynchronously after the sign-in has committed, allowing multiple concurrent requests to validate the same token successfully. The revocation is implemented as an upsert operation that does not conflict on concurrent attempts, so no request loses the race. This flaw enables attackers holding a leaked magic link token to authenticate repeatedly as the victim, violating the intended single-use token policy. The affected versions are >=3.9.0 <4.15.0 and >=5.0.0-rc.0 <5.0.0-rc.14.

Potential Impact

An attacker with access to a leaked single-use magic link token can replay the token multiple times concurrently to authenticate as the target user multiple times. This breaks the single-use token security model, potentially allowing unauthorized access to user accounts without needing additional credentials or privileges. The vulnerability has a high severity with a CVSS 4.0 score of 9.1, indicating critical impact on confidentiality and integrity without requiring user interaction or privileges.

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 patch is available, users should consider mitigating the risk by avoiding use of single-use magic link tokens or implementing external synchronization to serialize token redemption. Monitor vendor communications for updates on an official fix.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
EEF
Date Reserved
2026-08-31T01:00:10.817Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6aabe86855bf5e2cf56c51c5

Added to database: 09/17/2026, 13:17:28 UTC

Last enriched: 09/17/2026, 13:31:40 UTC

Last updated: 09/18/2026, 00:44:18 UTC

Views: 11

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses