The vulnerability, identified as GHSA-25pw-4h6w-qwvm, is an authorization flaw in OpenClaw where DM-paired identities are incorrectly treated as group-authorized identities. This occurs when dmPolicy is set to pairing and groupPolicy is set to allowlist.
The root cause of the vulnerability lies in the logic used to compose the effective allow-lists for group channels. The function resolveEffectiveAllowFromLists and its channel-specific variants (e.g., resolveMattermostEffectiveAllowFromLists) incorrectly included identities from the DM pairing store (storeAllowFrom) when constructing the allow-list for groups (effectiveGroupAllowFrom).
During runtime, when a message is received in a group channel, a message handler function is invoked. The analysis of the patch 051fdcc428129446e7c084260f837b7284279ce9 shows that functions like monitorMattermostProvider (for Mattermost) and resolveIMessageInboundDecision (for iMessage) were responsible for this message processing. These functions would call the flawed helper functions to check permissions. Because the returned group allow-list was tainted with DM-only identities, the check would pass incorrectly, allowing the message from the unauthorized sender to be processed.
The fix involves removing the flawed helper functions and centralizing the authorization logic into a new function, resolveDmGroupAccessWithLists. This new function correctly isolates the DM and group authorization scopes, ensuring that the DM pairing store is not consulted for group authorization decisions. The patch updates the message processing functions to use this new, secure implementation.