Skip to main content
Menu
Advisories

Webhook SSRF protection can be bypassed with DNS rebinding

GHSA-W589-2FFR-2PRVPublished Updated GitHub

Description

Bugsink's outbound webhook protection in affected versions could be bypassed with DNS rebinding.

When sending a webhook, Bugsink resolved the configured webhook hostname and checked the resulting IP addresses against the outbound webhook policy. The actual HTTP request was then made separately by requests, which performed its own DNS resolution. An attacker who controls the webhook hostname's DNS responses could therefore return a public IP address during Bugsink's policy check, and a non-global or otherwise blocked IP address during the later HTTP connection.

Impact

This issue affects Bugsink's outbound webhook integrations.

A project admin who can configure or modify a webhook URL may be able to make Bugsink send an outbound HTTP POST request to a destination that should have been blocked by the webhook policy, including loopback, private, or otherwise non-allowlisted destinations.

The practical impact is limited:

  • this is an outbound webhook SSRF issue, not a general-purpose proxy
  • the attacker needs project-admin access in Bugsink
  • Bugsink does not follow redirects for these webhook requests
  • the request method is POST and the request body is constrained by Bugsink's webhook payloads
  • response exposure is limited to Bugsink's normal webhook failure reporting

In other words, this is a real policy bypass, but it is narrower than a full arbitrary-request primitive.

Technical Details

The vulnerable path validated the webhook URL and then sent it with a separate requests.post() call:

validate_webhook_url(webhook_url)
return requests.post(webhook_url, *args, timeout=5, **kwargs)

validate_webhook_url() resolved the hostname and applied ALERTS_WEBHOOK_DENY_NON_GLOBAL, ALERTS_WEBHOOK_DENY_LIST, and ALERTS_WEBHOOK_ALLOW_LIST. requests.post() then established the TCP connection using a fresh DNS lookup.

For a hostname controlled by the attacker, those two lookups could return different answers. This could allow a webhook URL to pass validation as a public destination while the HTTP client actually connected to a blocked internal address.

Fix

Bugsink now resolves and validates the webhook hostname once for each send, then pins the outbound HTTP request to the validated IP address. The original hostname is still used for the Host header and for HTTPS hostname verification/SNI, so normal virtual-hosted HTTPS webhook endpoints continue to work.

Workarounds

If you cannot upgrade immediately:

  • restrict who can configure or modify webhook URLs
  • prefer ALERTS_WEBHOOK_OUTBOUND_MODE="allowlist_only" with specific trusted webhook hostnames
  • use deployment-level egress controls for destinations that must never be reachable from Bugsink

What is Bugsink?

Bugsink is a self-hosted error tracking tool with a Sentry-compatible SDK ingestion API. It is designed to be simple to run, understand, and maintain.

Affected versions

References

GitHub · bugsink/bugsink