The vulnerability, CVE-2025-8285, is a missing authorization issue in the Mattermost Confluence Plugin. The core of the problem lies in the API endpoints that handle channel subscriptions. My analysis of the commits between the vulnerable version (v1.4.0) and the patched version (v1.5.0) reveals that the plugin failed to properly verify a user's permissions before creating, editing, or viewing subscriptions.
The primary vulnerable functions were handleSaveSubscription and handleEditChannelSubscription. Before the patch, these functions only checked if the user making the request had a linked Confluence account. They did not perform the critical step of checking if that user had access rights to the specific Confluence space or page for the subscription. This allowed any authenticated Mattermost user to create a subscription for any channel they were in to any Confluence space or page, even private ones, simply by knowing its key or ID. This would cause the plugin to post notifications from the restricted space/page into the Mattermost channel, leaking potentially sensitive information.
The patch introduced a new function, validateUserConfluenceAccess, which is now called from both handleSaveSubscription and handleEditChannelSubscription. This new function uses the user's actual Confluence credentials to make an API call to Confluence and verify that the user has permission to access the resource before the subscription is created or modified.
Additionally, a related flaw was fixed in the handleGetChannelSubscription function, which was accepting the user ID from the URL path, allowing potential information disclosure about other users' subscriptions. The fix ensures the user ID is taken from the secure request header.
In summary, the root cause was a failure to enforce resource-level permissions, allowing users to bypass Confluence's access controls through the Mattermost plugin's subscription API.