Webhook SSRF

A webhook/callback URL is an attacker-stored, server-executed HTTP request; SSRF arises when the destination is validated once at configuration (or not at all) and dispatched from a trusted internal position at delivery time.

How it works

Webhooks, outbound integrations, and “test URL” buttons turn the app’s job/worker service into an HTTP client pointed at a user-supplied URL. Three recurring failure modes:

  • No validation: validateTargets()/equivalent only checks scheme + parseability, never resolving the host or rejecting private ranges. Private IPs (127.0.0.1, 10/8, 172.16/12, 192.168/16, 169.254.169.254) are accepted and the stored address is passed straight to http.NewRequest/axios.post.
  • Validate-at-config, not-at-send: validation runs when the webhook is created but the delivery path trusts the stored value, so a later change, a redirect, or DNS rebinding reaches an internal target. Validation and delivery must happen on the same resolved address.
  • One path validated, another not: a validateUrlSsrf()-style guard exists but a secondary trigger (a conditions filter, a custom-header feature, a retry/redirect path) skips it.
  • Wrong validator reused: Traewelling applied App\Rules\SecureUrl, an RFC 8252 OAuth redirect-URI rule (any https:// host plus http:// loopback on any port), to the server-side webhook URL; the RFC’s loopback exception is correct for redirect URIs and wrong for server fetches (GHSA-4h3f-pf38-2rhj).

Exfiltration: many webhook systems store or surface the delivery response (execution/delivery logs, “last response”, condition evaluation), making otherwise-blind SSRF full-read. POST-only metadata quirk: webhook delivery is usually a POST, so GET-only metadata endpoints aren’t reachable — but POST-capable metadata (and most internal services) are. Bypass primitives: open redirects on allowlisted hosts, HTTP→internal redirects, DNS Rebinding, and IP Address Encoding Bypasses.

Techniques / payloads

  • Set the webhook URL to http://169.254.169.254/latest/meta-data/iam/security-credentials/<role> or an internal service; trigger the event (push, workflow run, notification) and read the captured response in delivery logs. See Cloud Metadata Service Exploitation.
  • Custom headers: where supported (GitLab), inject routing-affecting header values to redirect the request behind a proxy (CVE-2025-6454).
  • Redirect: point the webhook at an attacker host that 302s to 169.254.169.254/internal when the sender follows redirects without re-validating (MLflow CVE-2026-64849).
  • Rebinding: attacker DNS returns a public IP at validation, a private IP at delivery.

Notable cases

  • Harbor (GHSA-2phj-cp9f-qq6w, CWE-918): any user who can create a project becomes ProjectAdmin and can create a webhook to IMDS; validateTargets() only checks scheme, webhook_job.go POSTs the stored address with a plain http.Client. HTTP 201 on creation is the bug; delivery fires autonomously on the next image push → IAM credential theft. Fixed v2.13.6/2.14.5/2.15.3/2.16.0. OX scan: 6,370 reachable pre-fix instances, 718 cloud-hosted.
  • GitLab CVE-2025-6454 (CVSS 8.5): SSRF via webhook custom headers (feature added 16.11); Maintainer/Owner can craft header values that alter proxy routing to internal/metadata targets. Fixed 18.3.2 (also ≤18.1.6, 18.2.6).
  • MLflow CVE-2026-64849 (CVSS 9.3, CISA KEV): unauthenticated full-read SSRF in webhook delivery; _validate_webhook_url bypassed via unvalidated HTTP redirects and DNS rebinding. Fixed 3.15.0.
  • Novu CVE-2026-125114 (CVSS 8.3): conditions-filter webhook passes child.webhookUrl to axios.post without calling validateUrlSsrf; response stored in execution details and exposed via GET /execution-details. Fixed 3.15.0.
  • Squidex CVE-2026-24736: SSRF in webhook configuration.
  • Traewelling GHSA-4h3f-pf38-2rhj: any self-registered user creates an OAuth app with authorizedWebhookUrl (e.g. http://127.0.0.1:<port>/…, https://10.0.0.5/), authorizes it, checks in; the queue worker POSTs there. spatie/laravel-webhook-server delivery left Guzzle’s default 5 redirects on, so an external 302 reached 169.254.169.254 (POST becomes GET). Blind, but GET /api/v1/applications/{clientId}/webhook-stats exposed per-call response codes as an internal-service oracle. Suggested fix: dedicated webhook validator (https, resolve, reject loopback/private/link-local/CGNAT/reserved v4+v6, re-check at delivery), allow_redirects => false.

Defenses

  • Validate at delivery time on the resolved IP, not at config; re-resolve and re-check on every redirect hop; cap/deny redirects.
  • Deny private/link-local/metadata ranges and non-HTTP schemes; allowlist destinations where feasible; apply the guard to every delivery path (filters, retries, custom headers).
  • Egress-restrict the delivery worker; enforce IMDSv2; don’t echo raw delivery responses back to low-privilege users. See SSRF Prevention and Blind SSRF.

Sources