CVE-2025-58073 Overview
CVE-2025-58073 is a missing authorization vulnerability [CWE-862] in Mattermost Server. The flaw allows authenticated attackers to join any team on a Mattermost server by manipulating the OAuth state parameter during the invite flow. Affected versions include Mattermost 10.11.x <= 10.11.1, 10.10.x <= 10.10.2, and 10.5.x <= 10.5.10. The server fails to verify that a user has permission to join a team using the original invite token, bypassing team-level access restrictions.
Critical Impact
Any authenticated user can join any team on a vulnerable Mattermost server, exposing private channels, files, and conversations regardless of team restrictions.
Affected Products
- Mattermost Server 10.11.x through 10.11.1
- Mattermost Server 10.10.x through 10.10.2
- Mattermost Server 10.5.x through 10.5.10
Discovery Timeline
- 2025-10-16 - CVE-2025-58073 published to NVD
- 2025-10-21 - Last updated in NVD database
Technical Details for CVE-2025-58073
Vulnerability Analysis
The vulnerability resides in the OAuth-based team join workflow of Mattermost Server. When a user accepts a team invitation linked to an OAuth login, the server should validate the original invite token against the user's permission to join that team. The affected versions skip this validation step. An attacker who controls the OAuth state parameter can substitute a target team identifier, causing the server to add the attacker to a team for which no valid invite exists.
This is a business logic flaw classified as Missing Authorization [CWE-862]. The vulnerability does not require elevated privileges. A standard authenticated account on the Mattermost server is sufficient to trigger the issue. Successful exploitation grants the attacker the same access as a legitimately invited member, including private channels, file attachments, and direct messages within the joined team.
Root Cause
The root cause is the absence of a permission check tied to the original invite token during the OAuth callback. The server trusts the team identifier embedded in the manipulated OAuth state rather than validating it against the invite token that initiated the flow. This breaks the binding between the issued invite and the team being joined.
Attack Vector
The attack requires network access to the Mattermost server and a low-privileged authenticated account. An attacker initiates an OAuth-based team join, intercepts the request, and modifies the state parameter to reference an arbitrary team ID. The server processes the callback without verifying the invite token's permissions and adds the attacker to the targeted team. No user interaction by the victim or administrator is required.
No public proof-of-concept exploit is available at the time of publication. See the Mattermost Security Updates advisory for additional technical details.
Detection Methods for CVE-2025-58073
Indicators of Compromise
- Unexpected team membership additions in the Mattermost audit log without a corresponding invite issuance event.
- OAuth callback requests where the state parameter contains team identifiers that do not match a previously issued invite token.
- User accounts appearing in private teams shortly after authenticating via an external OAuth provider.
- Audit log entries showing team joins from accounts that never received an invite-to-team notification.
Detection Strategies
- Correlate Mattermost audit events for team-join actions with the corresponding invite-token issuance events and alert on mismatches.
- Monitor reverse proxy and application logs for OAuth callback requests with anomalous or repeatedly modified state values.
- Review team membership rosters against expected invitation records and flag deviations.
Monitoring Recommendations
- Forward Mattermost server logs and audit events to a centralized logging platform for retention and correlation.
- Establish a baseline of normal OAuth login and team join patterns to identify deviations.
- Alert on bulk team joins by a single user within a short timeframe.
How to Mitigate CVE-2025-58073
Immediate Actions Required
- Upgrade Mattermost Server to a patched release above 10.11.1, 10.10.2, or 10.5.10 according to your deployment branch.
- Audit current team memberships and remove accounts that joined without a valid invite trail.
- Rotate active OAuth client secrets if abuse is suspected during the exposure window.
Patch Information
Mattermost has released fixed versions addressing CVE-2025-58073. Administrators should consult the Mattermost Security Updates page to identify the appropriate patched release for their supported branch and apply it following standard upgrade procedures.
Workarounds
- Restrict server signup and limit OAuth provider trust to reduce the pool of accounts capable of triggering the flaw.
- Temporarily disable OAuth-based team invitations until the patched version is deployed if upgrading is delayed.
- Enforce administrator approval for new team joins where supported by your Mattermost configuration.
# Verify the running Mattermost server version
mattermost version
# Example upgrade flow (Linux tarball deployment)
systemctl stop mattermost
tar -xvzf mattermost-<patched-version>-linux-amd64.tar.gz
systemctl start mattermost
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

