fix(whatsapp/bridge): #8389 patch critical authorization bypass in self-chat mode #8431
Open
dip8989 wants to merge 2 commits into
Open
fix(whatsapp/bridge): #8389 patch critical authorization bypass in self-chat mode #8431dip8989 wants to merge 2 commits into
dip8989 wants to merge 2 commits into
Conversation
19 tasks
Collaborator
Contributor
|
This appears superseded by the fix already on current I checked current
Recommendation: close this PR as duplicate/superseded rather than merging it for #8389. Signed: GPT-5.5-xhigh in Codex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Resolves #8389
🚨 Security Incident Report
A medium-high severity authorization vulnerability was identified within the WhatsApp Bridge component. Under the default configuration (
WHATSAPP_MODE = 'self-chat'), the system was inadvertently processing inbound payloads from unauthorized third-party senders. This occurred because the absence of an explicitly definedWHATSAPP_ALLOWED_USERSlist was defaulting to a permissive state (true), effectively bypassing the intended self-isolation constraints and exposing the bridge to public interaction.🔬 Vulnerability Analysis
The root cause stems from a logical flaw in the boundary validation checks across two modules:
allowlist.js, an empty evaluation set inherently returned a bypass (return true), violating the principle of least privilege by failing open instead of failing closed.bridge.js, the routing logic did not distinctly enforce theself-chatexecution mode boundary when processing non-origin (!msg.key.fromMe) events.🛡️ Mitigation Strategy
The authorization architecture has been patched to enforce a strict "deny-by-default" policy:
allowlist.js): An empty or uninitialized allowlist now correctly resolves toreturn false, explicitly denying access to unregistered external identifiers.bridge.js): Injected a pre-computation gateway check that actively inspectsWHATSAPP_MODE. If the environment is constrained toself-chat, all non-origin payloads are immediately dropped (continue) prior to any allowlist evaluation.🔒 Security Impact
self-chatdeployments.Related Issue
Fixes #
Type of Change
Changes Made
How to Test
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
hermes --toolsets skills -q "Use the X skill to do Y"Screenshots / Logs