Apr 26, 2026·5 min read·43 visits
A flaw in OpenClaw's Feishu message parsing logic misclassifies DMs as group chats, bypassing private message access policies (dmPolicy).
OpenClaw versions prior to 2026.4.20 contain a vulnerability in the Feishu integration module where direct messages (DMs) are incorrectly classified as group chats during card interactions. This misclassification leads to a bypass of the dmPolicy enforcement mechanism, allowing unauthorized execution of bot commands within private contexts.
The openclaw npm package provides integration services for the Feishu (Lark) collaboration platform. A core component of this integration is the message card action handler, which processes user interactions with interactive bot messages. This handler relies on an internal policy engine to enforce access controls, specifically separating Direct Message (DM) policies from group chat policies to restrict sensitive actions.
Versions of openclaw prior to 2026.4.20 contain an incorrect authorization vulnerability (CWE-863) within the card action classification logic. The system incorrectly infers the conversation context of synthetic message events triggered by card interactions. Because of a flawed heuristic, the internal dispatcher systematically misclassifies private DMs as group chats.
This misclassification leads to a direct bypass of the dmPolicy enforcement mechanism. When the dispatcher receives a card action from a DM, it applies the group policy ruleset instead of the intended private ruleset. This authorization bypass allows users to execute restricted commands or access bot functionalities that administrators intended to limit within private contexts.
The vulnerability stems from an unsafe logic default in the generation of synthetic message events. When a user interacts with a message card in Feishu, OpenClaw synthesizes an internal message event to process the action as a standard bot command. This process requires the system to determine the conversational context (P2P or group) to route the command to the appropriate policy engine.
The original implementation utilized a simple ternary check to determine the conversation type based on the event payload. The logic evaluated the presence of a chat_id field within the event context. If the field existed, the system assumed the conversation was a group chat.
This logic is fundamentally flawed because the Feishu API assigns a distinct chat_id to both group conversations and P2P (DM) conversations. The presence of a chat_id is not an exclusive indicator of a group chat. Consequently, the ternary condition evaluated to true for all DMs, improperly enforcing the `
The root cause exists in the initial context parsing logic. The vulnerable implementation relied entirely on implicit, unverified context clues from the webhook payload:
// Vulnerable Implementation
chat_type: event.context.chat_id ? "group" : "p2p"The patch introduced in commit 90979d7c3ef7ec30b9f8aa6963a5e38d2f17d166 completely replaces this classification mechanism. The system now actively queries the Feishu API using the im.chat.get endpoint to retrieve the authoritative chat_mode and chat_type attributes. This eliminates reliance on the ambiguous chat_id presence check.
// Patched Implementation Snippet
async function resolveCardActionChatType(params) {
// Cache lookup omitted for brevity
try {
const response = await createFeishuClient(params.account).im.chat.get({
path: { chat_id: chatId },
});
if (response.code === 0) {
const resolvedChatType =
normalizeResolvedCardActionChatType(response.data?.chat_mode) ??
normalizeResolvedCardActionChatType(response.data?.chat_type);
if (resolvedChatType) {
return resolvedChatType;
}
}
} catch (err) {
params.log(`API resolution failed: ${err.message}`);
}
return "p2p"; // Safe fallback
}The updated resolveCardActionChatType function implements crucial defense-in-depth measures. It introduces an in-memory LRU cache with a 30-minute TTL to store resolved chat types, preventing API rate limiting and latency degradation. Furthermore, the logic defaults to a secure fail-closed state by returning `
The attack methodology requires the attacker to have established a direct message session with the vulnerable OpenClaw bot in a Feishu workspace. The attacker must also receive an interactive message card generated by the bot that contains actionable elements, such as buttons or form submissions.
The attacker initiates the exploit by interacting with the card element. This action triggers a webhook from the Feishu API to the OpenClaw backend. The OpenClaw handler processes the webhook payload, encounters the chat_id field assigned to the DM session, and synthesizes a message event with the chat_type explicitly set to `
The primary impact of this vulnerability is an authorization bypass affecting internal bot access controls. By tricking the policy engine into applying group chat rules to private interactions, attackers can circumvent restrictions explicitly defined in the dmPolicy configuration block.
This flaw primarily affects the confidentiality and integrity of the bot's state or the data it manages. If an administrator configured the dmPolicy to block sensitive administrative commands but permitted them in specific restricted group channels, any user interacting with a card in a DM could execute those administrative commands.
The CVSS v3.1 base score is evaluated at 5.3 (Medium). The attack vector is strictly network-based, requires low complexity, and demands no specialized privileges or active user interaction beyond the attacker interacting with the bot. The scope remains unchanged as the vulnerability does not allow escape from the bot's application context into the underlying host environment.
The immediate remediation path is upgrading the openclaw package to version 2026.4.20 or later. This version contains the comprehensive API verification logic and fail-closed state handling required to resolve the chat context accurately.
For environments where immediate patching is impossible, administrators should review existing group policies. Ensuring that group policies enforce the principle of least privilege limits the blast radius of a dmPolicy bypass. If both policies require strict authorization for sensitive actions, the impact of the misclassification is significantly reduced.
Security and operations teams must monitor Feishu bot application logs for anomalous behavior. The patched version emits a distinct log entry stating card action missing chat type for chat; defaulting to p2p when the primary resolution fails. A high frequency of these fallback events warrants investigation to ensure the API integration functions correctly.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
openclaw openclaw | < 2026.4.20 | 2026.4.20 |
| Attribute | Detail |
|---|---|
| Vulnerability Class | Incorrect Authorization (CWE-863) |
| Attack Vector | Network |
| CVSS v3.1 Score | 5.3 |
| Exploit Status | Unexploited |
| Authentication Required | None |
| Impact Context | Application Level Access Control Bypass |
The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.
CVE-2026-129299 (GHSA-24mq-4vc6-2prf) is a parsing and serialization flaw in SpamScope mail-parser prior to version 4.6.2. The library uses reflective Python attribute resolution (getattr) over untrusted email header names and applies caller convenience transformations (such as underscore-to-hyphen folding and _json/_raw suffix stripping) directly to wire headers. An unauthenticated remote attacker can send crafted emails that trigger uncaught TypeError exceptions during JSON serialization or cause security-relevant headers and body content to be silently dropped without setting defect indicators.
CVE-2026-129236 is a command-line argument injection vulnerability (CWE-88) in Kubeshark, an eBPF-based network observability tool for Kubernetes. Located within the Model Context Protocol (MCP) server implementation in cmd/mcpRunner.go, the flaw occurs when handling the start_kubeshark tool request. When the MCP server runs with the --allow-destructive flag, the callStartKubeshark function appends the caller-supplied pod_regex parameter directly to the kubeshark tap argument slice without an end-of-options (--) delimiter. Because Kubeshark uses the Cobra and pflag libraries for command-line parsing, any pod_regex value prefixed with a hyphen is interpreted as a CLI flag rather than a positional regular expression. An attacker capable of influencing MCP tool arguments, such as through indirect prompt injection against a connected Large Language Model (LLM) agent, can inject the --set flag to override Helm chart values like tap.docker.registry. Because Kubeshark deploys its worker DaemonSet with privileged security contexts and host networking enabled, redirecting the container image registry allows arbitrary code execution as root across all Kubernetes cluster nodes.
Kubeshark versions 53.1.0 prior to 53.4.0 contain an arbitrary file write and path traversal vulnerability (CWE-22) alongside an argument injection vulnerability (CWE-88) in the Model Context Protocol (MCP) server implementation (cmd/mcpRunner.go). The download_file tool fails to validate caller-supplied path and dest arguments, allowing an attacker who influences an AI agent driving kubeshark mcp to write Kubeshark Hub API responses to arbitrary locations writable by the local user. Additionally, the start_kubeshark tool appends the pod_regex argument without flag delimiters, allowing argument injection into the kubeshark tap subcommand.
CVE-2026-129300 (GHSA-xhrq-2mqv-q8wx) is an unhandled exception vulnerability in SpamScope mail-parser, a Python library used to parse raw emails. When processing an email with a malformed Received header containing an out-of-range year or timezone offset, standard library datetime conversion routines raise OverflowError or OSError. Because the internal error handler only caught TypeError and ValueError, these exceptions escape the parser hierarchy, terminating email ingestion pipelines and causing a denial of service.
CVE-2026-129301 (GHSA-8cgq-x343-p74c) is an uncaught exception and MIME interpretation conflict vulnerability in the Python email parsing library mail-parser (versions >= 4.6.0 and < 4.6.3). The write_attachments() function iterates over parsed email attachments without per-attachment exception containment. When processing a specially crafted MIME part containing an RFC 2231-encoded null byte in the filename, a basename exceeding filesystem NAME_MAX limits, or a malformed base64 payload, the function raises an unhandled standard library exception (ValueError, OSError, or binascii.Error). This prematurely aborts the attachment extraction loop, preventing subsequent attachments from being written to disk for downstream security inspection while also triggering unhandled worker crashes in applications that only catch MailParserError.
Directus versions prior to 12.3.1 contain an authorization bypass and privilege management flaw in the SharesService component. Authenticated non-administrative users with update permissions on the directus_shares collection can modify the user_created, role, item, and collection fields of an existing owned share. Because the update operation validates permissions solely against the pre-update record state without revalidating the modified fields, an attacker can reassign share ownership and role context to an administrator. Subsequent guest access using the share token derives administrative accountability, exposing restricted relational data.