The vulnerability is an incorrect authorization issue in Mattermost's API, specifically affecting endpoints that return channel member information. The core of the issue is that the system was not properly checking if a user was authorized to view sensitive metadata (like LastViewedAt and LastUpdateAt) of other users, particularly across different teams. The provided patches address this by introducing a sanitization step. A new method, SanitizeForCurrentUser, was added to the ChannelMember model. This method redacts the LastViewedAt and LastUpdateAt fields if the channel member being processed is not the user making the request. This sanitization was then applied in multiple API handler functions, including addChannelMember, getChannelMembers, getChannelMembersByIds, getChannelMember, getChannelMembersForTeamForUser, and getChannelMembersForUser. Before the patch, these functions would return unsanitized data, leading to an information disclosure vulnerability. An attacker could call these API endpoints to gather activity information of users they should not have access to.