{"id":"CVE-2025-12421","aliases":["CVE-2025-12421","GHSA-mp6x-97xj-9x62","GO-2025-4170"],"related":[],"kind":"vulnerability","state":"published","title":"Account Takeover via Code Exchange Endpoint","summary":"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).","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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).","source":"cvelist"},{"lang":"en","text":"Mattermost fails to to verify the token used during code exchange in github.com/mattermost/mattermost-server.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe 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.","format":"markdown","source":"go"},{"lang":"es","text":"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).","source":"nvd"}],"published":"2025-11-27T17:47:04.944Z","modified":"2026-10-19T13:10:00.110Z","severity":{"scorer":"Mattermost","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"},"severities":[{"scorer":"Mattermost","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"}],"cwes":["CWE-287","CWE-303"],"affected":[{"ranges":[{"type":"semver","introduced":"11.0.0","lastAffected":"11.0.2","status":"affected"},{"type":"semver","introduced":"10.12.0","lastAffected":"10.12.1","status":"affected"},{"type":"semver","introduced":"10.11.0","lastAffected":"10.11.4","status":"affected"},{"type":"semver","introduced":"10.5.0","lastAffected":"10.5.12","status":"affected"},{"version":"11.1.0","status":"unaffected"},{"version":"11.0.3","status":"unaffected"},{"version":"10.12.2","status":"unaffected"},{"version":"10.11.5","status":"unaffected"},{"version":"10.5.13","status":"unaffected"}],"vendor":"Mattermost","product":"Mattermost","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"8.0.0-20251022210333-acda1fb5dd46"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost/server/v8","purl":"pkg:golang/github.com/mattermost/mattermost/server/v8","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"11.0.0","status":"affected","fixed":"11.0.3"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost-server","purl":"pkg:golang/github.com/mattermost/mattermost-server","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"10.12.0","status":"affected","fixed":"10.12.2"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost-server","purl":"pkg:golang/github.com/mattermost/mattermost-server","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"10.11.0","status":"affected","fixed":"10.11.5"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost-server","purl":"pkg:golang/github.com/mattermost/mattermost-server","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"10.5.0","status":"affected","fixed":"10.5.13"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost-server","purl":"pkg:golang/github.com/mattermost/mattermost-server","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost-server","purl":"pkg:golang/github.com/mattermost/mattermost-server","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost-server/v5","purl":"pkg:golang/github.com/mattermost/mattermost-server/v5","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost-server/v6","purl":"pkg:golang/github.com/mattermost/mattermost-server/v6","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"8.0.0-20251022210333-acda1fb5dd46"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost/server/v8","purl":"pkg:golang/github.com/mattermost/mattermost/server/v8","source":"go"},{"ranges":[{"status":"affected","introduced":"10.5.0","fixed":"10.5.13"},{"status":"affected","introduced":"10.11.0","fixed":"10.11.5"},{"status":"affected","introduced":"10.12.0","fixed":"10.12.2"},{"status":"affected","introduced":"11.0.0","fixed":"11.0.3"}],"vendor":"mattermost","product":"mattermost_server","cpe":"cpe:2.3:a:mattermost:mattermost_server:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://mattermost.com/security-updates","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-12421","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/mattermost/mattermost/commit/5072bbf689a46b3b97b2373f26149f5891396e6b","tags":["web"],"sources":["ghsa","go"]},{"url":"https://github.com/mattermost/mattermost/commit/acda1fb5dd46a2f46c76ae67012423c760525eaa","tags":["web"],"sources":["ghsa","go"]},{"url":"https://github.com/mattermost/mattermost/commit/f361e7d75a7ab9df5a2106e1ceb919b94b55e41d","tags":["web"],"sources":["ghsa","go"]},{"url":"https://github.com/mattermost/mattermost/commit/feb598ed2b7ac3cb78a253b032ad7e4628b0de00","tags":["web"],"sources":["ghsa","go"]},{"url":"https://github.com/mattermost/mattermost","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-mp6x-97xj-9x62","tags":["advisory"],"sources":["go"]}],"credits":["daw10"],"assigner":"Mattermost","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-12-02T04:55:57.705Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-12421","url":"https://www.cve.org/CVERecord?id=CVE-2025-12421","licence":"CVE Terms of Use","modified":"2026-02-26T16:07:25.754Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mp6x-97xj-9x62","url":"https://github.com/advisories/GHSA-mp6x-97xj-9x62","licence":"CC-BY-4.0","modified":"2025-12-15T21:11:10.008Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2025-4170","url":"https://pkg.go.dev/vuln/GO-2025-4170","licence":"CC-BY-4.0","modified":"2026-03-03T04:57:44.235Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-12421","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-12421","licence":"Public domain","modified":"2026-10-19T13:10:00.110Z"}],"updatedAt":"2026-11-25T22:59:08.073Z","epss":{"score":0.00463,"percentile":0.41793,"date":"2026-12-01T12:00:22.000Z"}}