Skip to content

Mattermost fails to to verify the token used during code exchange

Critical severity GitHub Reviewed Published Nov 27, 2025 to the GitHub Advisory Database • Updated Dec 1, 2025

Package

gomod github.com/mattermost/mattermost-server (Go)

Affected versions

>= 11.0.0, < 11.0.3
>= 10.12.0, < 10.12.2
>= 10.11.0, < 10.11.5
>= 10.5.0, < 10.5.13

Patched versions

11.0.3
10.12.2
10.11.5
10.5.13
gomod github.com/mattermost/mattermost/server/v8 (Go)
< 8.0.0-20251022210333-acda1fb5dd46
8.0.0-20251022210333-acda1fb5dd46

Description

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).

References

Published by the National Vulnerability Database Nov 27, 2025
Published to the GitHub Advisory Database Nov 27, 2025
Reviewed Dec 1, 2025
Last updated Dec 1, 2025

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(22nd percentile)

Weaknesses

Improper Authentication

When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. Learn more on MITRE.

Incorrect Implementation of Authentication Algorithm

The requirements for the product dictate the use of an established authentication algorithm, but the implementation of the algorithm is incorrect. Learn more on MITRE.

CVE ID

CVE-2025-12421

GHSA ID

GHSA-mp6x-97xj-9x62

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.