MediumGHSA-6fx5-5cw5-4897
Craft CMS Race condition in Token Service potentially allows for token usage greater than the token limit
Affected versions
4.5.0-RC1 to before 4.16.19, 5.0.0-RC1 to before 5.8.23 - fixed in 4.16.19Details
A Time-of-Check-Time-of-Use (TOCTOU) race condition exists in Craft CMS’s token validation service for tokens that explicitly set a limited usage. The `getTokenRoute()` method reads a token’s usage count, checks if it’s within limits, then updates the database in separate non-atomic operations. By sending concurrent requests, an attacker can use a single-use impersonation token multiple times before the database update completes. To make this work, an attacker needs to obtain a valid user account impersonation URL with a non-expired token via some other means and exploit a race condition whil
Is your site exposed?Run a free passive scan. See your platform, versions and the issues on your surface in under a minute.
Check if my site is affected