Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-41365

CVE-2026-41365: Openclaw Auth Bypass Vulnerability

CVE-2026-41365 is an authentication bypass flaw in Openclaw that allows attackers to retrieve MS Teams messages bypassing sender allowlist filters. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-41365 Overview

CVE-2026-41365 is an authorization bypass vulnerability in OpenClaw versions before 2026.3.31 that affects the Microsoft Teams thread history functionality when using the Graph API. The vulnerability allows attackers to retrieve thread messages that should be filtered by sender allowlists, effectively bypassing message filtering restrictions designed to limit which messages are processed based on sender identity.

Critical Impact

Attackers with low privileges can bypass sender allowlist controls to access filtered thread messages in MS Teams integrations, potentially exposing sensitive communications that were intended to be restricted.

Affected Products

  • OpenClaw versions prior to 2026.3.31
  • OpenClaw Node.js package (openclaw:openclaw)
  • MS Teams integrations utilizing Graph API thread history fetching

Discovery Timeline

  • April 28, 2026 - CVE-2026-41365 published to NVD
  • April 28, 2026 - Last updated in NVD database

Technical Details for CVE-2026-41365

Vulnerability Analysis

This vulnerability is classified as CWE-441 (Unintended Proxy or Intermediary), where the OpenClaw application fails to properly enforce sender allowlist restrictions when fetching thread history via the Microsoft Graph API. The flaw exists in the message handler component responsible for processing MS Teams conversations.

When a group policy is configured to use an allowlist for filtering messages by sender, the application correctly applies this filter to direct messages. However, when retrieving thread replies through the Graph API, the application failed to apply the same allowlist filtering logic, allowing all messages in the thread to be returned regardless of whether the sender was on the approved list.

The vulnerability requires network access and low-level privileges to exploit, as an attacker would need authenticated access to the OpenClaw system to trigger the thread history retrieval functionality.

Root Cause

The root cause is a missing authorization check in the message-handler.ts file within the MS Teams extension. When thread replies are fetched using fetchThreadReplies(), the resulting messages were passed directly to formatThreadContext() without first filtering them against the sender allowlist. This oversight meant that the groupPolicy === "allowlist" check and the corresponding resolveMSTeamsAllowlistMatch() function were not applied to thread history messages.

Attack Vector

The attack vector is network-based, requiring an authenticated attacker to exploit the MS Teams integration. The attack flow involves:

  1. The attacker identifies an OpenClaw instance with MS Teams integration configured with sender allowlist policies
  2. The attacker triggers a thread history retrieval request via the Graph API
  3. The application fetches all thread messages without applying sender filtering
  4. Messages from senders not on the allowlist are exposed to the attacker
typescript
           fetchThreadReplies(graphToken, groupId, conversationId, activity.replyToId),
         ]);
         const allMessages = parentMsg ? [parentMsg, ...replies] : replies;
-        const formatted = formatThreadContext(allMessages, activity.id);
+        const threadMessages =
+          groupPolicy === "allowlist"
+            ? allMessages.filter((msg) => {
+                return resolveMSTeamsAllowlistMatch({
+                  allowFrom: effectiveGroupAllowFrom,
+                  senderId: msg.from?.user?.id ?? "",
+                  senderName: msg.from?.user?.displayName,
+                  allowNameMatching,
+                }).allowed;
+              })
+            : allMessages;
+        const formatted = formatThreadContext(threadMessages, activity.id);
         if (formatted) {
           threadContext = formatted;
         }

Source: GitHub Commit

Detection Methods for CVE-2026-41365

Indicators of Compromise

  • Unexpected access to thread messages from senders not on configured allowlists
  • Anomalous Graph API thread history requests from unauthorized users
  • Log entries showing thread context retrieval containing messages from blocked senders

Detection Strategies

  • Monitor Graph API calls to MS Teams thread history endpoints for unusual access patterns
  • Implement logging around the fetchThreadReplies() function to track message retrieval
  • Compare retrieved message sender IDs against configured allowlist entries in audit logs
  • Review application logs for thread context operations that include unauthorized sender data

Monitoring Recommendations

  • Enable verbose logging for MS Teams integration components in OpenClaw
  • Set up alerts for thread history requests from users who should not have access to certain sender messages
  • Implement monitoring for Group Policy bypass attempts in authentication and authorization layers

How to Mitigate CVE-2026-41365

Immediate Actions Required

  • Upgrade OpenClaw to version 2026.3.31 or later immediately
  • Review MS Teams integration configurations using sender allowlist policies
  • Audit recent thread history access logs for potential unauthorized message exposure
  • Temporarily disable MS Teams thread history features if immediate patching is not possible

Patch Information

The vulnerability has been addressed in OpenClaw version 2026.3.31. The fix adds proper sender allowlist filtering to thread history messages by applying the resolveMSTeamsAllowlistMatch() function to all messages retrieved via the Graph API before passing them to formatThreadContext(). Organizations should update to the patched version by referencing the GitHub Security Advisory and applying the security commit.

Workarounds

  • Disable MS Teams thread history retrieval functionality until the patch can be applied
  • Implement network-level restrictions to limit access to Graph API endpoints
  • Configure additional authorization layers at the API gateway level to validate sender filtering
  • Review and restrict user permissions for accessing MS Teams integration features
bash
# Configuration example - Disable thread history retrieval temporarily
# In openclaw configuration file
MSTEAMS_THREAD_HISTORY_ENABLED=false
MSTEAMS_STRICT_ALLOWLIST_MODE=true

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.