openclaw - 💡(How to fix) Fix WhatsApp plugin silently ignores route bindings (security-relevant) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#75211Fetched 2026-05-01 05:36:48
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
2
Timeline (top)
commented ×1mentioned ×1subscribed ×1

The WhatsApp plugin does not implement compileConfiguredBinding / matchInboundConversation (the API contract that other channel plugins like bluebubbles, feishu, imessage, line use to honor bindings[] in openclaw.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.list if none is marked default: true).

Error Message

There is no warning, no log line, no error — the binding rules are just decorative for WA.

Root Cause

The WhatsApp plugin does not implement compileConfiguredBinding / matchInboundConversation (the API contract that other channel plugins like bluebubbles, feishu, imessage, line use to honor bindings[] in openclaw.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.list if none is marked default: true).

Fix Action

Fix / Workaround

Workaround we deployed

Workarounds work but rely on careful coordination. Native binding support in the WA plugin would let us delete most of this.

Code Example

{
  "bindings": [
    {
      "type": "route",
      "agentId": "relay",
      "match": { "channel": "whatsapp", "accountId": "+51XXXXXXXXX" }
    }
  ]
}

---

{ "type": "route", "agentId": "relay", "match": { "channel": "whatsapp", "accountId": "+51XXXXXXXXX" } }

---

$ grep -l "compileConfiguredBinding" dist/extensions/*/api.js
dist/extensions/bluebubbles/api.js
dist/extensions/feishu/api.js
dist/extensions/imessage/api.js
dist/extensions/line/api.js
# ← whatsapp is missing

---

if (!plugin || !provider || !provider.compileConfiguredBinding || !provider.matchInboundConversation) return null;
RAW_BUFFERClick to expand / collapse

Bug: WhatsApp plugin silently ignores bindings route configuration

Version: OpenClaw 2026.4.14 Plugin: whatsapp Severity: 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 like bluebubbles, feishu, imessage, line use to honor bindings[] in openclaw.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.list if none is marked default: true).

Why this matters (security)

In our deployment, the default agent (main) has full tool access (exec, subagents, read, write, image, web). The relay agent is restricted to exec only and is meant for team contacts.

We assumed bindings were enforced. They are not. We discovered 9 active sessions in our main agent for team WA numbers, when those should have been routed to relay. 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

  1. Use openclaw 2026.4.14 with WhatsApp plugin enabled
  2. Configure agents.list with main and relay
  3. Add to bindings:
    { "type": "route", "agentId": "relay", "match": { "channel": "whatsapp", "accountId": "+51XXXXXXXXX" } }
  4. Send a WA message from +51XXXXXXXXX to the bot
  5. Observe: session created at agents/main/sessions/sessions.json under key agent:main:whatsapp:direct:+51XXXXXXXXX — NOT in relay

Confirmation in source

In dist/extensions/<plugin>/api.js (or equivalent):

$ grep -l "compileConfiguredBinding" dist/extensions/*/api.js
dist/extensions/bluebubbles/api.js
dist/extensions/feishu/api.js
dist/extensions/imessage/api.js
dist/extensions/line/api.js
# ← whatsapp is missing

The WhatsApp plugin under dist/extensions/whatsapp/ (1146 files, including channel-plugin-api.js, api.js) does not export compileConfiguredBinding nor matchInboundConversation.

binding-registry-CUcd4-sZ.js requires both for resolveConfiguredBindingProvider to return non-null:

if (!plugin || !provider || !provider.compileConfiguredBinding || !provider.matchInboundConversation) return 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:

  1. Purge agent:main:whatsapp:direct:+57X sessions for team numbers (cron */5)
  2. Hard rule in main agent's BOOT.md: do not call any privileged tool if sender_id is not the owner
  3. Caller-allowlist guard at the top of sensitive scripts (odoo_query.py etc.) — reads latest user message metadata for sender_id, exits 99 if not in allowlist
  4. Custom watchdog (wa_relay_watchdog.sh) that detects unforwarded inbound and auto-restarts relay

Workarounds work but rely on careful coordination. Native binding support in the WA plugin would let us delete most of this.

Environment

  • OpenClaw 2026.4.14 (commit 323493f)
  • Node 20.x in Docker container
  • WhatsApp plugin via Baileys
  • Linux (Ubuntu 22.04 ARM64 host)

Happy to provide more details or test a fix. Thanks for OpenClaw — it's been great otherwise.

extent analysis

TL;DR

The WhatsApp plugin in OpenClaw 2026.4.14 silently ignores bindings route configuration, allowing all WhatsApp inbound messages to be routed to the default agent, which can be a security risk.

Guidance

  • The issue is caused by the WhatsApp plugin not implementing the compileConfiguredBinding and matchInboundConversation functions, which are required to honor bindings[] in openclaw.json.
  • To verify the issue, send a WhatsApp message from a configured account and check if the session is created in the default agent instead of the intended agent.
  • A temporary workaround is to implement defense-in-depth measures, such as purging unwanted sessions, adding hard rules to the main agent, and using caller-allowlist guards in sensitive scripts.
  • To mitigate the issue, the WhatsApp plugin should be updated to implement the required functions or emit a log warning when bindings[].match.channel === "whatsapp" is found but unsupported.

Example

No code example is provided as the issue is related to the implementation of specific functions in the WhatsApp plugin.

Notes

The provided workaround is effective but relies on careful coordination and may not be suitable for all environments. Native binding support in the WhatsApp plugin would provide a more robust solution.

Recommendation

Apply the workaround measures until the WhatsApp plugin is updated to support bindings route configuration. This will help prevent potential security risks until a permanent fix is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

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.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING