Mar 4, 2026·5 min read·2 visits
The OpenClaw Zalo plugin failed to validate sender identity for group messages. Any user in a Zalo group with the bot could bypass the 'allowFrom' restriction and execute commands. Fixed in version 2026.2.25.
A critical authorization bypass vulnerability exists in the Zalo plugin of OpenClaw, allowing unauthorized users in group chats to execute commands and trigger agent actions. The flaw stems from a failure to enforce sender allowlists on group message events, bypassing the intended security controls restricted to direct messages.
The Zalo extension for OpenClaw contains a critical Incorrect Authorization vulnerability (CWE-863) that compromises the security boundary between trusted administrators and untrusted users. OpenClaw is a personal AI assistant designed to execute tasks based on natural language inputs; the Zalo plugin enables interaction via the Zalo chat platform.
By design, the plugin is intended to restrict interaction to a specific set of users defined in the allowFrom configuration. However, the implementation failed to apply this restriction to messages originating from group chats (GROUP message type). While Direct Messages (DMs) were correctly filtered, the ingestion pipeline treated group messages as trusted by default or failed to subject them to the same authorization logic.
This oversight allows any user who shares a group context with the OpenClaw agent to issue commands. Depending on the tools and capabilities granted to the agent (e.g., file system access, API integrations, or code execution), this vulnerability can lead to full system compromise or unauthorized information disclosure.
The root cause of this vulnerability lies in the message processing logic within extensions/zalo/src/monitor.ts. The original implementation of the Zalo plugin was biased towards Direct Messages, and the authorization checks were structured around the assumption that interactions would primarily occur in one-on-one contexts.
When the Zalo API pushed a GROUP event, the application's event listener correctly ingested the message but the authorization middleware failed to validate the senderId against the configured allowlist. The logic lacked a specific branch to handle group-based authorization policies (groupPolicy or groupAllowFrom), effectively causing the system to 'fail open' for group traffic.
Specifically, the processMessageWithPipeline function did not verify membership in the allowFrom list when isGroup was true. This meant that the security check, which effectively gated DMs, was completely bypassed for group messages, allowing the payload to proceed to the command execution engine without sender verification.
The vulnerability remediation involved introducing explicit group policy checks in the message monitoring loop. The fix enforces a default-deny posture for group messages unless explicitly allowed.
Vulnerable Logic (Conceptual): In the previous version, the code processed messages without distinguishing effectively between DMs and Groups regarding authorization:
// monitor.ts (Pre-patch)
// The allowFrom check was either skipped or applied incorrectly for groups
if (config.allowFrom.includes(senderId)) {
// Process DM
} else if (isGroup) {
// VULNERABLE: Group messages fell through to processing
// without explicit authorization checks.
processMessageWithPipeline(...);
}Patched Logic:
The fix introduces a robust authorization check using evaluateZaloGroupAccess. This function determines if the sender is authorized based on new configuration parameters (groupPolicy, groupAllowFrom) or falls back to the default allowFrom list.
// monitor.ts (Patched in b4010a0b6)
// 1. Evaluate access rights specifically for the group context
const groupAccess = isGroup
? evaluateZaloGroupAccess({
providerConfigPresent: config.channels?.zalo !== undefined,
configuredGroupPolicy: account.config.groupPolicy,
defaultGroupPolicy,
groupAllowFrom,
senderId,
})
: undefined;
// 2. Enforce the decision: Drop if not allowed
if (groupAccess && !groupAccess.allowed) {
logVerbose(core, runtime, `zalo: drop group sender ${senderId} (groupPolicy=allowlist)`);
return; // Stop processing immediately
}
// 3. Proceed to pipeline only if authorized
processMessageWithPipeline(...);This change ensures that even if an agent is added to a public or shared group, it will ignore commands from unauthorized users.
Exploiting this vulnerability requires no special tools or technical sophistication; it relies entirely on the logical flaw in the application's design. The attacker needs only a standard Zalo account and access to a group where the vulnerable OpenClaw bot is present.
Attack Scenario:
@MyBot /execute rm -rf /).GROUP message, it bypasses the DM-specific allowFrom check.Since the vulnerability allows bypassing the allowlist, the attacker effectively gains the privileges of the bot owner without needing to compromise credentials.
The impact of this vulnerability is rated Critical (CVSS 9.8) because it allows unauthenticated remote attackers to control the AI agent. The specific consequences depend heavily on the tools and permissions granted to the OpenClaw instance:
The lack of user interaction and the low complexity of exploitation (sending a chat message) make this a high-risk vector for any deployment exposing the Zalo plugin.
The primary remediation is to update the OpenClaw package to version 2026.2.25 or later. This version introduces the necessary logic to handle group authorization correctly.
Configuration Updates:
Post-update, administrators should explicitly configure the group policy in their config.json or environment variables to ensure strict access control:
{
"channels": {
"zalo": {
"groupPolicy": "allowlist",
"groupAllowFrom": ["<trusted-user-id-1>", "<trusted-user-id-2>"]
}
}
}Temporary Workarounds: If an immediate update is not possible, the following mitigations are effective:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
OpenClaw OpenClaw | < 2026.2.25 | 2026.2.25 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-863 |
| Attack Vector | Network |
| CVSS Score | 9.8 (Critical) |
| Vector String | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Exploit Status | Active |
| Platform | Node.js |
Incorrect Authorization