ash_authentication: Time-of-check Time-of-use (TOCTOU) Race Condition
CVE-2026-82761 is a critical-severity time-of-check time-of-use (TOCTOU) race condition vulnerability in ash_authentication from Team-alembic, with a CVSS 4.0 base score of 9.1 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists versions 4.15.0, 5.0.0-rc.14 as the first without the flaw, so updating ash_authentication to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.56% chance of exploitation within 30 days, which is low compared with other CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Update ash_authentication to 4.15.0 or 5.0.0-rc.14, whichever matches your release line, or a later version.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Team-alembic | ash_authentication | 3.9.0 up to, but not including, 4.15.0; 5.0.0-rc.0 up to, but not including, 5.0.0-rc.14; cf3d227ef25912cf1b0c5fa80f20001f5c46a102 and later | 4.15.0, 5.0.0-rc.14 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Attack requirements
- PresentThe target must be in a specific state or configuration for the attack to work.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Confidentiality (vulnerable system)
- HighSerious loss of confidentiality on the vulnerable system.
- Integrity (vulnerable system)
- HighSerious loss of integrity on the vulnerable system.
- Availability (vulnerable system)
- NoneNo loss of availability on the vulnerable system.
- Confidentiality (other systems)
- NoneNo loss of confidentiality on systems beyond the vulnerable one.
- Integrity (other systems)
- NoneNo loss of integrity on systems beyond the vulnerable one.
- Availability (other systems)
- NoneNo loss of availability on systems beyond the vulnerable one.
Vector: 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X. Scored by CNA.
Official 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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Time-of-check Time-of-use (TOCTOU) Race Condition
The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.
How developers prevent this class of flaw
- The most basic advice for TOCTOU vulnerabilities is to not perform a check before the use. This does not resolve the underlying issue of the execution of a function on a resource whose state and identity cannot be assured, but it does help to limit the false sense of security given by the check.
- When the file being altered is owned by the current user and group, set the effective gid and uid to that of the current user and group when executing this statement.
- Limit the interleaving of operations on files from multiple processes.
More Time-of-check Time-of-use (TOCTOU) Race Condition vulnerabilities (CWE-367)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
Other vulnerabilities in ash_authentication
- 7.6 High severity
- 7.4 High severity
- 9.1 Critical severity
- 9.1 Critical severity
- 9.1 Critical severity
- 9.1 Critical severity
Recent Time-of-check Time-of-use (TOCTOU) Race Condition vulnerabilities
- 8.3 High severity
- 8.3 High severity
- 8.3 High severity
- 8.7 High severity
- 8.8 High severity
- 9.0 Critical severity
Spotted an error? Tell us.