9.9critical
Account Takeover via Code Exchange Endpoint
- Severity
- 9.9critical CVSS:3.1 by Mattermost
- Exploit likelihood
- 0.46% (higher than 41% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Mattermost
- Also known as
- GHSA-mp6x-97xj-9x62GO-2025-4170
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).
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Mattermost Mattermost | from 11.0.0 up to 11.0.2, from 10.12.0 up to 10.12.1, from 10.11.0 up to 10.11.4, from 10.5.0 up to 10.5.12 Not affected: 11.1.0, 11.0.3, 10.12.2, 10.11.5, 10.5.13 | CVE List |
| github.com/mattermost/mattermost/server/v8 (Go) | before 8.0.0-20251022210333-acda1fb5dd46 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/mattermost/mattermost-server (Go) | from 11.0.0 before 11.0.3, from 10.12.0 before 10.12.2, from 10.11.0 before 10.11.5, from 10.5.0 before 10.5.13, all versions | GitHub Advisory Database, Go Vulnerability Database |
| github.com/mattermost/mattermost-server/v5 (Go) | all versions | Go Vulnerability Database |
| github.com/mattermost/mattermost-server/v6 (Go) | all versions | Go Vulnerability Database |
| mattermost mattermost_server | from 10.5.0 before 10.5.13, from 10.11.0 before 10.11.5, from 10.12.0 before 10.12.2, from 11.0.0 before 11.0.3 | NVD |
All scores
| Mattermost | 9.9critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
| GitHub | 9.9critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
Classification
What each source says
CVE List
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).
Go Vulnerability Database
Mattermost fails to to verify the token used during code exchange in github.com/mattermost/mattermost-server.
NOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.
(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)
The additional affected modules and versions are: github.com/mattermost/mattermost-server from v10.5.0 before v10.5.13, from v10.11.0 before v10.11.5, from v10.12.0 before v10.12.2, from v11.0.0 before v11.0.3.
NVD (es)
Las versiones de Mattermost 11.0.x menor o igual que 11.0.2, 10.12.x menor o igual que 10.12.1, 10.11.x menor o igual que 10.11.4, 10.5.x menor o igual que 10.5.12 no verifican que el token utilizado durante el intercambio de código se origine del mismo flujo de autenticación, lo que permite a un usuario autenticado realizar una toma de control de cuenta a través de una dirección de correo electrónico especialmente diseñada, utilizada al cambiar métodos de autenticación y enviar una solicitud al endpoint /users/login/sso/code-exchange. La vulnerabilidad requiere que ExperimentalEnableAuthenticationTransfer esté habilitado (predeterminado: habilitado) y que RequireEmailVerification esté deshabilitado (predeterminado: deshabilitado).
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-12421 changed 2026-02-26 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-mp6x-97xj-9x62 changed 2025-12-15 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2025-4170 changed 2026-03-03 | CC-BY-4.0 |
| NVD | CVE-2025-12421 changed 2026-10-19 | Public domain |