You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JWT assertion jti leaves the replay cache before the assertion expires #1877
JwtAuthService::verifyAssertion() stores a used assertion's jti for ACCESS_TOKEN_TTL (300s) from now (lib/Service/JwtAuthService.php:205). JwtAssertionVerifier accepts an iat up to CLOCK_SKEW_SECONDS (60s) in the future, with exp - iat ≤ 300 (lib/Service/JwtAssertionVerifier.php:193-200).
An assertion minted with iat = now + 60 and exp = now + 360 therefore stays valid until about now + 360s, while its jti leaves the cache at now + 300s.
Impact: anyone holding a captured assertion can exchange it a second time in that ~60s gap (POST /api/v1/token, ApplicationTokenController::exchange()) and get a fresh 300s access token. Deactivating the application still stops it.
Fix: cache the jti until the assertion's own expiry plus skew, for example max(1, (int)$claims['exp'] - time() + self::CLOCK_SKEW_SECONDS). Add a test that replays an iat = now + 60, exp = now + 360 assertion after 300s and expects the replay refusal.
Activity
github-actions commentedon Nov 17, 2026
Thank you for opening this issue! It has been assigned to @rubenvdlinde for review.
What happens next:
Triage labels:
triage:accept-feature— accepted as a new featuretriage:accept-bugfix— accepted as a bug fixtriage:needs-info— more information neededtriage:wontfix— will not be addressedtriage:duplicate— duplicate of another issue