CVE-2025-6227: Mattermost has Insufficiently Protected Credentials
2.2
Basic Information
Technical Details
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/mattermost/mattermost-server | go | >= 10.5.0, < 10.5.8 | 10.5.8 |
github.com/mattermost/mattermost-server | go | >= 9.11.0, < 9.11.17 | 9.11.17 |
github.com/mattermost/mattermost/server/v8 | go | < 8.0.0-20250612074655-8f8612c63783 | 8.0.0-20250612074655-8f8612c63783 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability lies in the remote cluster invitation process where the same token from the invitation was reused for the established connection. This allowed an attacker who intercepted the invitation details to potentially send unauthorized payloads. The core of the vulnerability is in the remotecluster.Service.AcceptInvitation
function, which failed to generate a new, unique token upon accepting an invitation. The provided patch addresses this by introducing a versioning system for invitations. For new version 2 invitations, AcceptInvitation
now generates a fresh token. The app.App.CreateRemoteClusterInvite
function was updated to create these new version 2 invites, and remotecluster.Service.ReceiveInviteConfirmation
was updated to handle the new refreshed token sent back in the confirmation, thus completing the secure token negotiation flow. An engineer seeing this CVE would need to ensure their Mattermost instance is patched to a version where this new token negotiation logic is present to prevent potential abuse of the remote cluster feature.
Vulnerable functions
remotecluster.Service.AcceptInvitation
server/platform/services/remotecluster/invitation.go
app.App.CreateRemoteClusterInvite
server/channels/app/remote_cluster.go
remotecluster.Service.ReceiveInviteConfirmation
server/platform/services/remotecluster/recv.go