# CVE-2025-12421: Account Takeover via Code Exchange Endpoint

- Severity: Critical 9.9 (CVSS:3.1, scored by Mattermost) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.46%, higher than 41% of CVEs (2026-12-01)
- Published: 2025-11-27T17:47:04.944Z
- Modified: 2026-10-19T13:10:00.110Z
- Also known as: GHSA-mp6x-97xj-9x62, GO-2025-4170
- Weaknesses: CWE-287, CWE-303
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Mattermost

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

(As written by CVE List.)

## Affected

- 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)
- github.com/mattermost/mattermost/server/v8 (Go): before 8.0.0-20251022210333-acda1fb5dd46
- 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.com/mattermost/mattermost-server/v5 (Go): all versions
- github.com/mattermost/mattermost-server/v6 (Go): all versions
- 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

## Every score

- Mattermost: CVSS:3.1 9.9 Critical `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.9 Critical `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`

## References

- <https://mattermost.com/security-updates> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-12421> (advisory)
- <https://github.com/mattermost/mattermost/commit/5072bbf689a46b3b97b2373f26149f5891396e6b> (web)
- <https://github.com/mattermost/mattermost/commit/acda1fb5dd46a2f46c76ae67012423c760525eaa> (web)
- <https://github.com/mattermost/mattermost/commit/f361e7d75a7ab9df5a2106e1ceb919b94b55e41d> (web)
- <https://github.com/mattermost/mattermost/commit/feb598ed2b7ac3cb78a253b032ad7e4628b0de00> (web)
- <https://github.com/mattermost/mattermost> (package)
- <https://github.com/advisories/GHSA-mp6x-97xj-9x62> (advisory)

## Sources

- CVE List: [CVE-2025-12421](https://www.cve.org/CVERecord?id=CVE-2025-12421), CVE Terms of Use, modified 2026-02-26
- GitHub Advisory Database: [GHSA-mp6x-97xj-9x62](https://github.com/advisories/GHSA-mp6x-97xj-9x62), CC-BY-4.0, modified 2025-12-15
- Go Vulnerability Database: [GO-2025-4170](https://pkg.go.dev/vuln/GO-2025-4170), CC-BY-4.0, modified 2026-03-03
- NVD: [CVE-2025-12421](https://nvd.nist.gov/vuln/detail/CVE-2025-12421), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2025-12421 · Whole record: https://cve.day/CVE-2025-12421.json · Rebuilt by cve.day 2026-11-25T22:59:08.073Z
