Mattermost versions 10.5.x through 11.0.2 have a vulnerability where the token used during the code exchange in the authentication flow is not properly verified. This flaw allows an authenticated user to perform an account takeover by exploiting the /users/login/sso/code-exchange endpoint with a specially crafted email address. The vulnerability requires specific configuration settings: ExperimentalEnableAuthenticationTransfer enabled (default enabled) and RequireEmailVerification disabled (default disabled).