The vulnerability (CVE-2025-44004) in the Mattermost Confluence Plugin (< 1.5.0) is a classic 'Missing Authentication for Critical Function' (CWE-306). The core of the issue lies in the API endpoints responsible for managing channel subscriptions. These endpoints failed to verify if the user making the request was authenticated with the Mattermost instance.
The patch, found in commit de0a3d4c9eefa013e7d9f7a18d82eeced63322e6, addresses this by introducing a centralized authentication check. A new boolean field, IsAuthenticated, was added to the Endpoint struct. When this flag is set to true for a specific API endpoint, a new checkAuth middleware is invoked. This middleware verifies the presence of the Mattermost-User-Id header in the request, effectively ensuring that only authenticated users can access these sensitive endpoints.
The analysis of the patch reveals that several handlers were missing this check. The most critical of these is handleSaveSubscription, which maps to the API endpoint for creating new subscriptions, directly corresponding to the vulnerability description. Other functions for editing (handleEditChannelSubscription) and viewing (handleGetChannelSubscription, handleGetChannelSubscriptions) subscriptions were also left unprotected and were fixed in the same commit. An attacker could have sent a crafted HTTP request to these API endpoints to create, edit, or view channel subscriptions without any valid session or credentials.