Magic link single-use tokens replayable via TOCTOU race in AshAuthentication
team-alembic ash_authentication
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| team-alembic ash_authentication |
| No fix yet |
| team-alembic ash_authentication |
| No fix yet |
Original 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.