Skip to content

security: bind SMS and Webhook adapters to 127.0.0.1 by default#4267

Closed
SHL0MS wants to merge 1 commit into
NousResearch:mainfrom
SHL0MS:fix/bind-localhost-only
Closed

security: bind SMS and Webhook adapters to 127.0.0.1 by default#4267
SHL0MS wants to merge 1 commit into
NousResearch:mainfrom
SHL0MS:fix/bind-localhost-only

Conversation

@SHL0MS

@SHL0MS SHL0MS commented Mar 31, 2026

Copy link
Copy Markdown
Collaborator

Both adapters bound to 0.0.0.0, exposing HTTP servers to the local network. The API server adapter already correctly defaults to 127.0.0.1. SMS host now configurable via SMS_WEBHOOK_HOST env var. 3 lines changed. Closes #4260

Both adapters bound to 0.0.0.0, exposing their HTTP servers to the
local network (and internet if port-forwarded). The API server adapter
already correctly defaults to 127.0.0.1.

- sms.py: configurable via SMS_WEBHOOK_HOST env var, defaults to 127.0.0.1
- webhook.py: DEFAULT_HOST changed from 0.0.0.0 to 127.0.0.1

Users who need network exposure can set SMS_WEBHOOK_HOST=0.0.0.0 or
configure host in their webhook platform config.

Closes NousResearch#4260
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for thinking about security here @SHL0MS, but we're going to pass on this one.

Both the SMS and Webhook adapters are inbound webhook receivers — they exist to accept HTTP POSTs from external services (Twilio, GitHub, GitLab, Stripe, etc.). Binding to 127.0.0.1 would make them unreachable by those services, breaking the primary use case out of the box.

The API server correctly defaults to 127.0.0.1 because it serves local frontends (Open WebUI on the same machine). That's a different situation — the SMS/webhook adapters need to be externally reachable by design.

Users who run behind a reverse proxy and want localhost-only binding can already configure that through the webhook config's host setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security: SMS and Webhook adapters bind to 0.0.0.0 by default

2 participants