The vulnerability is a missing authorization check in the Mattermost Confluence plugin. The analysis of the security patch commit 97dbaf6c2983438401316865881e1f9630ccad2c shows that two key functions, handleEditChannelSubscription and handleSaveSubscription, were modified to fix this issue. Before the patch, these functions only verified that a user was connected to a Confluence instance but did not check if the user had the right to access the specific space or page for which they were creating or editing a subscription. This allowed any authenticated user to manage subscriptions for any Confluence space, even those they were not supposed to see.
The patch introduced a new function, validateUserConfluenceAccess, which explicitly performs these permission checks against the Confluence API. The vulnerable functions handleEditChannelSubscription and handleSaveSubscription were updated to call this new function, thereby closing the security gap. During an exploit, these two functions would be the entry points processing the malicious request and would therefore appear in a runtime profile.