Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-82761

Magic link single-use tokens replayable via TOCTOU race in AshAuthentication
Back to all
CVE

CVE-2026-82761

Magic link single-use tokens replayable via TOCTOU race in AshAuthentication

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 singleusetoken?, 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.afteraction callback, and AshAuthentication.Strategy.MagicLink.SignInChange in an aftertransaction 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.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
9.1
-
4.0
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
C
H
U
0
-
C
H
U
-

Related Resources

No items found.

References

https://cna.erlef.org/cves/CVE-2026-82761.html, https://github.com, https://osv.dev/vulnerability/EEF-CVE-2026-82761, https://repo.hex.pm, https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/82xxx/CVE-2026-82761.json, https://github.com/team-alembic/ashauthentication/security/advisories/GHSA-23gr-vcp4-r27q, https://nvd.nist.gov/vuln/detail/CVE-2026-82761, https://github.com/team-alembic/ashauthentication/commit/18dfdb36c14aa6a61df8572bce2d5ec36b1d9840, https://github.com/team-alembic/ashauthentication/commit/9ef6864b8833d3b795427a7b8dc518a4997d41ab, https://github.com/team-alembic/ashauthentication/commit/cf3d227ef25912cf1b0c5fa80f20001f5c46a102, https://github.com/team-alembic/ash_authentication

Severity

0

CVSS Score
0
10

Basic Information

Base CVSS
0
EPSS Probability
0.0056%
EPSS Percentile
0.45483%
Introduced Version
6767fe27eb952e5bc09aa2e5a7d8f96f5a1c424a
Fix Available
fea75958a081ed337ceb578396174039694c48df

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading