The vulnerability is a classic Time-of-check Time-of-use (TOCTOU) race condition within the SAML.getSession function located in internal/pkg/auth/interceptor/saml.go. The function's logic for validating a SAML session token involved two distinct steps: first, checking if the token had been used, and second, marking it as used. Because these two steps were not performed as a single, atomic operation, a window of opportunity existed for an attacker. By sending multiple concurrent requests with the same stolen SAML token, an attacker could have all requests pass the initial 'used' check before any of them had the chance to update the token's state to 'used'. The provided patch rectifies this by moving the check for the Used flag inside the atomic safe.StateUpdateWithConflicts operation, ensuring that checking and marking the token as used happens indivisibly. This prevents the race condition and enforces the single-use nature of the SAML session tokens.