Mattermost <=11.0.2 Auth Flow Token Origin Verification Flaw (SSO Code Exchange)
CVE-2025-12421 Published on November 27, 2025
Account Takeover via Code Exchange Endpoint
Mattermost versions 11.0.x <= 11.0.2, 10.12.x <= 10.12.1, 10.11.x <= 10.11.4, 10.5.x <= 10.5.12 fail to to verify that the token used during the code exchange originates from the same authentication flow, which allows an authenticated user to perform account takeover via a specially crafted email address used when switching authentication methods and sending a request to the /users/login/sso/code-exchange endpoint. The vulnerability requires ExperimentalEnableAuthenticationTransfer to be enabled (default: enabled) and RequireEmailVerification to be disabled (default: disabled).
Vulnerability Analysis
CVE-2025-12421 can be exploited with network access, and requires small amount of user privileges. This vulnerability is considered to have a low attack complexity. The potential impact of an exploit of this vulnerability is considered to be critical as this vulnerability has a high impact to the confidentiality, integrity and availability of this component.
Weakness Type
Incorrect Implementation of Authentication Algorithm
The requirements for the software dictate the use of an established authentication algorithm, but the implementation of the algorithm is incorrect. This incorrect implementation may allow authentication to be bypassed.
Products Associated with CVE-2025-12421
Want to know whenever a new CVE is published for MatterMost? stack.watch will email you.
Affected Versions
Mattermost:- Version 11.0.0, <= 11.0.2 is affected.
- Version 10.12.0, <= 10.12.1 is affected.
- Version 10.11.0, <= 10.11.4 is affected.
- Version 10.5.0, <= 10.5.12 is affected.
- Version 11.1.0 is unaffected.
- Version 11.0.3 is unaffected.
- Version 10.12.2 is unaffected.
- Version 10.11.5 is unaffected.
- Version 10.5.13 is unaffected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.