---
id: "CVE-2026-19076"
kind: "vulnerability"
aliases: ["CVE-2026-19076"]
title: "Mattermost: OAuth tokens can take over SSO accounts via account switch"
severity: "medium"
cvss: 4.4
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["mattermost", "oauth", "package", "self-hosted", "sso"]
not_affected_if: ["default-config", "no-oauth-apps"]
published_at: "2026-10-16T08:17:13+00:00"
first_seen_at: "2026-10-23T21:57:12+00:00"
updated_at: "2026-10-25T04:37:13+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-19076", "first_seen_at": "2026-10-23T21:57:12+00:00"}]
---

# Mattermost: OAuth tokens can take over SSO accounts via account switch

Mattermost fails to reject OAuth application sessions at its account type switch endpoint, POST /api/v4/users/login/switch. An attacker holding a valid OAuth bearer token for a user can set a password on that SSO-backed account and detach it from the identity provider, which gives them permanent control of the account.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the Mattermost server version and compare it against the affected ranges: 11.7.x up to 11.7.9, 11.8.x up to 11.8.5, 11.9.x up to 11.9.1, and 11.10.x up to 11.10.0.
- Review OAuth application grants and tokens for unexpected use against POST /api/v4/users/login/switch in server logs.

## Fix

- Upgrade Mattermost to a release that includes the MMSA-2026-00758 fix (the sources do not name the fixed versions).
- Revoke OAuth application sessions and tokens for affected users after upgrading.

## Timeline

- 2026-10-23T21:57:12+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-19076

## From the sources

Mattermost versions 11.10.x <= 11.10.0, 11.7.x <= 11.7.9, 11.9.x <= 11.9.1, 11.8.x <= 11.8.5 fail to reject OAuth application sessions in the account type switch endpoint, which allows an attacker with a valid OAuth bearer token for a target user to permanently take over that user's SSO-backed account by setting an attacker-controlled password and detaching the account from its identity provider via a crafted request to POST /api/v4/users/login/switch.. Mattermost Advisory ID: MMSA-2026-00758

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
