| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| goauthentik.io | go | < 0.0.0-20251119135424-6672e6aaa41e | 0.0.0-20251119135424-6672e6aaa41e |
The vulnerability exists in the get_invite method within the InvitationStage class in authentik/stages/invitation/stage.py. The core of the issue is that the application logic did not properly check for invitation expiry at the time of use. Instead, it relied on a periodic background task to clean up expired invitations. An attacker could therefore use an invitation that had expired but had not yet been cleaned up by the background task. The provided patch addresses this by introducing an explicit check for expiration when an invitation is fetched. The change from Invitation.objects.filter(pk=token).first() to Invitation.filter_not_expired(pk=token).first() in the get_invite function directly mitigates this vulnerability by ensuring that expired invitations are never returned as valid.
InvitationStage.get_inviteauthentik/stages/invitation/stage.py
Ongoing coverage of React2Shell