Status: Patched
This vulnerability has been verified as resolved and deployed.
Remote cluster PATCH response leaked authentication tokens (CVE-2026-7184)
Summary
Remote-cluster PATCH returned the updated model before clearing token fields
Mattermost's remote-cluster API already treated token and remote_token as sensitive fields: list, create, accept, and get handlers called RemoteCluster.Sanitize() before serializing objects to clients. The PATCH handler was the missed trust boundary. After decoding a caller-controlled RemoteClusterPatch and applying it through App.PatchRemoteCluster, patchRemoteCluster() wrote updatedRC directly to the HTTP response without sanitizing it first.
The public advisory MMSA-2026-00662 / CVE-2026-7184 describes this as a Medium CWE-201 issue affecting Mattermost 11.6.x <= 11.6.1, 11.5.x <= 11.5.4, and 10.11.x <= 10.11.15, with fixed versions 11.7.0, 11.6.2, 11.5.5, and 10.11.17. The original fix is PR #36288 / commit bd8fc92226726da06c8fabaef568cc9ebaee1cb8; release-line backports include #36310, #36311, and #36313.
CVSS Score
Vulnerability Location
Source-to-Sink Analysis
An authenticated caller supplies the PATCH body. The handler decodes that body into a RemoteClusterPatch; changing a harmless editable field such as display_name is enough to reach the vulnerable response path.
The endpoint is intentionally reachable to users with manage_secure_connections. That role can manage secure connections but is not equivalent to full system-administrator access to remote-cluster secrets.
App.PatchRemoteCluster returns the updated stored RemoteCluster object. That object still contains the trust credentials used by the remote-cluster relationship.
The model exposes both secret fields as JSON fields and provides Sanitize() specifically to blank them before response serialization.
Before PR #36288, the handler added the unsanitized object to the audit result and encoded the same object directly to the client, exposing token and remote_token in the PATCH response.
The accepted upstream fix sanitizes the updated object before both audit result capture and JSON encoding. Regression coverage now checks that PATCH responses return empty Token and RemoteToken values.
Impact Analysis
Critical Impact
The direct impact is disclosure of remote-cluster authentication material that should remain server-side. In deployments where those values are accepted by token-authenticated remote-cluster endpoints, the leaked credentials can let the caller impersonate a trusted remote-cluster peer or abuse remote-cluster trust flows.
Attack Surface
Mattermost deployments with remote-cluster support enabled and at least one existing remote-cluster record. The vulnerable route is PATCH /api/v4/remotecluster/{remote_id} and requires an authenticated session with manage_secure_connections.
Preconditions
The attacker must have the secure-connection management permission and know a valid remote cluster ID. No user interaction is required, and the PATCH body can change an ordinary editable field such as display_name.
Proof of Concept
Environment Setup
Use a vulnerable Mattermost build before PR #36288 with remote-cluster support enabled. Authenticate as a user that has manage_secure_connections, and identify an existing remote cluster ID through the admin UI or a permitted API path.
Target Configuration
Set MM_URL to the Mattermost base URL and RC_ID to an existing remote cluster ID. Use a session cookie or bearer token for a secure-connection manager.
Exploit Delivery
Send a benign PATCH request and inspect the returned object:
Outcome
A permitted secure-connection manager can read remote-cluster trust secrets from the PATCH response on vulnerable builds. PR #36288 prevents the disclosure by sanitizing before serialization.
Expected Response:
Vulnerable builds return non-empty token and/or remote_token values. Fixed builds return those fields as empty strings, matching the behavior of the other remote-cluster response paths.
Run this level of analysis on your repo.
Winfunc traces source-to-sink paths, validates exploitability, and gives your team patch-ready remediation.
