hermes - 💡(How to fix) Fix WhatsApp setup: WHATSAPP_ALLOWED_USERS should be mandatory [1 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
NousResearch/hermes-agent#15108Fetched 2026-04-25 06:24:33
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Code Example

if (!allowedUsers || allowedUsers.size === 0) {
    return true; // EMPTY ALLOWLIST = ALLOW EVERYONE
}
RAW_BUFFERClick to expand / collapse

Problem

When setting up WhatsApp via hermes gateway, the bridge starts with no allowlist by default. This means anyone who messages the user's WhatsApp number gets full agent access — terminal, file system, browser, etc.

The bridge code in scripts/whatsapp-bridge/allowlist.js explicitly allows all users when the list is empty:

if (!allowedUsers || allowedUsers.size === 0) {
    return true; // EMPTY ALLOWLIST = ALLOW EVERYONE
}

Real-world impact

A colleague (not on the allowlist) was able to:

  • Trigger skill listings
  • Ask the agent to look up FindMy location
  • Request API keys from .env files
  • Ask to open arbitrary URLs on the host machine
  • Send images and get vision analysis
  • Have full conversational access to the agent

The agent's built-in safety (refusing to share keys, refusing suspicious URLs) mitigated the worst outcomes, but this relies on prompt-level guardrails rather than access control.

Proposed fix

  1. Refuse to start WhatsApp bridge if WHATSAPP_ALLOWED_USERS is not set (or default to the paired phone number in self-chat mode)
  2. hermes gateway setup for WhatsApp should require the user to enter their phone number and auto-populate WHATSAPP_ALLOWED_USERS
  3. Log a prominent warning if the bridge starts without an allowlist
  4. In allowlist.js, change empty-set behavior from return true to return false (deny by default)

extent analysis

TL;DR

To address the security vulnerability, update the allowlist.js to deny access by default when the allowlist is empty and implement additional measures such as refusing to start the WhatsApp bridge if WHATSAPP_ALLOWED_USERS is not set.

Guidance

  • Review and modify the allowlist.js file to change the behavior for an empty allowlist from return true to return false to deny access by default.
  • Consider implementing a check to refuse starting the WhatsApp bridge if the WHATSAPP_ALLOWED_USERS environment variable is not set.
  • Enhance the hermes gateway setup for WhatsApp to require user input for their phone number and auto-populate WHATSAPP_ALLOWED_USERS for easier configuration.
  • Add logging to warn prominently when the bridge starts without an allowlist configured.

Example

if (!allowedUsers || allowedUsers.size === 0) {
    return false; // EMPTY ALLOWLIST = DENY EVERYONE
}

Notes

The proposed fix involves multiple steps to enhance security, including code changes and setup modifications. It's crucial to test these changes thoroughly to ensure they do not introduce unintended behavior.

Recommendation

Apply the workaround by updating the allowlist.js and implementing the proposed fixes to enhance security and access control. This approach directly addresses the identified vulnerability and improves the overall security posture of the WhatsApp bridge setup.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING