-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
WhatsApp plugin silently ignores route bindings (security-relevant) #75211
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.securitySecurity documentationSecurity documentationstaleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.securitySecurity documentationSecurity documentationstaleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Bug: WhatsApp plugin silently ignores
bindingsroute configurationVersion: OpenClaw 2026.4.14
Plugin:
whatsappSeverity: Security-relevant — silently routes ALL WA inbound to default agent regardless of configured bindings
Summary
The WhatsApp plugin does not implement
compileConfiguredBinding/matchInboundConversation(the API contract that other channel plugins likebluebubbles,feishu,imessage,lineuse to honorbindings[]inopenclaw.json).As a result, declaring routing rules like:
{ "bindings": [ { "type": "route", "agentId": "relay", "match": { "channel": "whatsapp", "accountId": "+51XXXXXXXXX" } } ] }…is silently ignored for the WhatsApp channel. All WA inbound messages fall through to the default agent (first entry in
agents.listif none is markeddefault: true).Why this matters (security)
In our deployment, the default agent (
main) has full tool access (exec,subagents,read,write,image,web). Therelayagent is restricted toexeconly and is meant for team contacts.We assumed
bindingswere enforced. They are not. We discovered 9 active sessions in ourmainagent for team WA numbers, when those should have been routed torelay. This effectively means any team contact had a path to a fully-privileged agent.There is no warning, no log line, no error — the binding rules are just decorative for WA.
Reproduction
openclaw2026.4.14 with WhatsApp plugin enabledagents.listwithmainandrelaybindings:{ "type": "route", "agentId": "relay", "match": { "channel": "whatsapp", "accountId": "+51XXXXXXXXX" } }+51XXXXXXXXXto the botagents/main/sessions/sessions.jsonunder keyagent:main:whatsapp:direct:+51XXXXXXXXX— NOT in relayConfirmation in source
In
dist/extensions/<plugin>/api.js(or equivalent):The WhatsApp plugin under
dist/extensions/whatsapp/(1146 files, includingchannel-plugin-api.js,api.js) does not exportcompileConfiguredBindingnormatchInboundConversation.binding-registry-CUcd4-sZ.jsrequires both forresolveConfiguredBindingProviderto return non-null:For WA plugin this returns null → binding rule is dropped silently.
Expected behavior
WA plugin should implement these two functions consistently with other channel plugins, OR emit a log warning when
bindings[].match.channel === "whatsapp"is found but unsupported, so operators don't assume security policies are in effect.Workaround we deployed
Defense-in-depth across 4 layers:
agent:main:whatsapp:direct:+57Xsessions for team numbers (cron*/5)BOOT.md: do not call any privileged tool ifsender_idis not the ownerodoo_query.pyetc.) — reads latest user message metadata forsender_id, exits 99 if not in allowlistwa_relay_watchdog.sh) that detects unforwarded inbound and auto-restarts relayWorkarounds work but rely on careful coordination. Native binding support in the WA plugin would let us delete most of this.
Environment
2026.4.14(commit323493f)Happy to provide more details or test a fix. Thanks for OpenClaw — it's been great otherwise.