fix(security) restrict unauthenticated webhook binds to loopback#6335
Open
WAXLYY wants to merge 3 commits into
Open
fix(security) restrict unauthenticated webhook binds to loopback#6335WAXLYY wants to merge 3 commits into
WAXLYY wants to merge 3 commits into
Conversation
dpskate
pushed a commit
to dpskate/hermes-agent
that referenced
this pull request
Apr 10, 2026
…attern bypass, redaction bypass, network exposure - Remove hermes-agent root from sandbox PYTHONPATH to prevent internal module import and API key exfiltration (mitigates NousResearch#7071) - Add 8 missing DANGEROUS_PATTERNS: heredoc injection, git destructive ops (reset --hard, push --force, clean -f, branch -D, checkout -- .), and chmod +x social engineering (mitigates NousResearch#6961) - Add base64/hex encoded secret detection to redact_sensitive_text() to prevent redaction bypass via encoding - Change default bind address from 0.0.0.0 to 127.0.0.1 for webhook, SMS/Twilio, and Telegram adapters (mitigates NousResearch#4260, NousResearch#6335) - Fix .env and config.yaml file permissions from 644 to 600 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
8 tasks
Collaborator
|
Related to #6223 — same pattern (enforce auth for non-loopback binds) applied to webhook adapter specifically. |
Collaborator
|
Related to #6223. |
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.
Summary
This PR addresses a significant security oversight where the Webhook adapter allowed unauthenticated remote execution when bound to non-loopback interfaces (e.g.,
0.0.0.0).Vulnerability Details
INSECURE_NO_AUTHbypass did not enforce network interface isolation, allowing remote attackers to trigger agent actions if the gateway was exposed.Changes
INSECURE_NO_AUTHflag now triggers a hard failure during startup if the bind address is not a loopback IP (127.0.0.1or::1).gateway/platforms/webhook.py.website/docs/user-guide/messaging/webhooks.mdto clearly define safe testing practices and security requirements.Testing ✅
tests/gateway/test_webhook_adapter.py.0.0.0.0withINSECURE_NO_AUTH(Fails as expected).127.0.0.1withINSECURE_NO_AUTH(Passes).WEBHOOK_SECRET(Passes).