Repository navigation
Description
Plugin: @openclaw/whatsapp v2026.6.10
Description:
When the WhatsApp Web session reconnects (e.g., after Gateway restart), the plugin's phone-number-based pairing fallback sends WhatsApp messages to random phone numbers from the linked account's address book (~6,585 contacts in our case).
The message sent was:
OpenClaw: access not configured.
Your WhatsApp phone number: +91xxxxxxxxxx
Pairing code: XXXXXXX
Ask the bot owner to approve with: openclaw pairing approve whatsapp XXXXXXX
Impact: The user's WhatsApp contacts received unsolicited messages from their number asking them to pair with OpenClaw. This happened without any user or agent action — just Gateway restarts during normal config changes triggered the WhatsApp plugin's reconnect logic. Two contacts were messaged before we caught it.
Expected behavior:
The WhatsApp plugin should not send outbound messages to random contacts from the address book without explicit user confirmation. Number-based pairing should either:
- Only send to a pre-configured phone number set by the user in config
- Require explicit user confirmation before any message is dispatched
- Default to not sending any outbound pairing messages
Steps to reproduce:
- Enable WhatsApp plugin (
"whatsapp": { "enabled": true }) - Link a WhatsApp account (scan QR code)
- Restart the Gateway multiple times
- Check if pairing codes are sent to contacts from the address book
Mitigation:
- Disabled the plugin (
"whatsapp": { "enabled": false }) - Deleted WhatsApp credentials at
~/.openclaw/credentials/whatsapp/
Environment:
- OpenClaw 2026.6.10
- Ubuntu on WSL2 (Windows)
- WhatsApp plugin installed from npm package
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 26, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 26, 2026, 3:13 PM ET / 19:13 UTC.
Summary
Keep open: current
mainreduces older no-content and historical-message cases, but it still has an intentional pairing-reply send path for content-bearing unknown WhatsApp DMs, and there is no live reconnect/address-book proof showing the fresh v2026.6.10 report is fixed.Reproducibility: no. not at high confidence from live behavior. Source inspection shows the remaining pairing-send path for content-bearing unknown DMs, but I did not reproduce the reconnect/address-book event against a real linked WhatsApp account.
Ways to help us reproduce this
Next step
The fix shape is plausible, but the report is security-sensitive and needs maintainer/security review plus live WhatsApp reconnect evidence before automation changes pairing semantics.
Security
Needs attention: The issue itself is security-sensitive because unsolicited pairing replies can expose setup codes and contact private WhatsApp recipients without intent.
Review details
Best possible solution:
Keep this open as the canonical fresh v2026.6.10 tracker for WhatsApp/security maintainers to capture the live reconnect event shape and tighten the plugin inbound boundary without breaking legitimate first-DM pairing.
Do we have a high-confidence way to reproduce the issue?
No, not at high confidence from live behavior. Source inspection shows the remaining pairing-send path for content-bearing unknown DMs, but I did not reproduce the reconnect/address-book event against a real linked WhatsApp account.
Is this the best way to solve the issue?
Unclear until the exact Baileys reconnect event is captured. The likely best fix is a WhatsApp-owned inbound gate for reconnect/history/contact-sync side effects, while preserving deliberate live first-DM pairing behavior.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against e5123e44b0f5.
Label changes
Label changes:
clawsweeper:fix-shape-clear: Current issue advisory state no longer selects this label.Label justifications:
P1: The issue describes an urgent privacy-impacting WhatsApp channel bug affecting a real user on the latest stable release.impact:security: The reported behavior can disclose pairing-code instructions and contact private WhatsApp address-book entries without user intent.impact:message-loss: The affected channel path can misdirect outbound WhatsApp messages to unintended recipients.Evidence reviewed
Security concerns:
extensions/whatsapp/src/inbound/access-control.ts:161The reported behavior sends pairing-code instructions to unintended WhatsApp contacts, creating a privacy and social-engineering risk even if final approval still requires the owner.
Confidence: 0.78
Acceptance criteria:
What I checked:
AGENTS.md:1, e5123e44b0f5)extensions/AGENTS.md:1, e5123e44b0f5)VISION.md:15, e5123e44b0f5)@openclaw/whatsappv2026.6.10 sent the standard pairing reply to two contacts during Gateway restarts, with no user or agent action.dmPolicy: pairing,checkInboundAccessControlcreates a WhatsApp pairing request and callssock.sendMessagewith the pairing reply. (extensions/whatsapp/src/inbound/access-control.ts:134, e5123e44b0f5)normalizeInboundMessagedrops Baileys upserts without extractable inbound user content before access control, which fixes the older no-content path but still allows content-bearing direct events into pairing access control. (extensions/whatsapp/src/inbound/monitor.ts:826, e5123e44b0f5)Likely related people:
hasInboundUserContentguard for unsolicited pairing replies. (role: recent feature owner; confidence: high; commits: 46783d41e92f, 53bd5d6bd29e, 236c04dd71a4; files:extensions/whatsapp/src/inbound/extract.ts,extensions/whatsapp/src/inbound/monitor.ts,extensions/whatsapp/src/inbound/extract.test.ts)extensions/whatsapp/src/inbound/access-control.ts,extensions/whatsapp/src/inbound/monitor.ts,extensions/whatsapp/src/inbound/extract.ts)src/pairing/pairing-messages.ts,src/pairing/pairing-challenge.ts,src/config/types.channel-messaging-common.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.openclaw-barnacle commentedon Jul 11, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
openclaw-barnacle commentedon Jul 19, 2026
Closing due to inactivity.
If this is still an issue, please retry on the latest OpenClaw release and share updated details.
If you are absolutely sure it still happens on the latest release, open a new issue with fresh steps to reproduce.