The vulnerability lies in the improper authorization logic for group messages across multiple channel implementations (Mattermost, LINE, iMessage, Telegram). The core issue was that identities from the Direct Message (DM) pairing store (storeAllowFrom) were being used to evaluate authorization for group channels. This allowed a user who was approved for DMs via the pairing mechanism to bypass the explicit group allowlist (groupAllowFrom).
The fix involved two main commits. The first commit (8bdda7a651c21e98faccdbbd73081e79cffe8be0) corrected the logic in several places to ensure that the group allowlist evaluation does not inherit from the DM pairing store. This was done by modifying the resolveEffectiveAllowFromLists function and updating the calling code in monitorMattermostProvider and shouldProcessLineEvent.
The second commit (051fdcc428129446e7c084260f837b7284279ce9) centralized the DM and group authorization logic into a new function, resolveDmGroupAccessWithLists, to prevent similar vulnerabilities in the future. This refactoring was applied to monitorMattermostProvider and resolveIMessageInboundDecision.
The identified vulnerable functions are the ones that either contained the flawed logic directly or used a shared function (resolveEffectiveAllowFromLists) that had the vulnerability, leading to incorrect authorization decisions.