Skip to content

fix: (backport) prevent SSRF via redirect following in webhook delivery (#7877)#7892

Merged
Dhruwang merged 1 commit intorelease/4.9from
backport/fix-ssrf-webhook-redirect
Apr 27, 2026
Merged

fix: (backport) prevent SSRF via redirect following in webhook delivery (#7877)#7892
Dhruwang merged 1 commit intorelease/4.9from
backport/fix-ssrf-webhook-redirect

Conversation

@Dhruwang
Copy link
Copy Markdown
Member

Summary

  • Backport of fix: prevent SSRF via redirect following in webhook delivery #7877 (6d9ab315c) to release/4.9
  • Prevents SSRF via redirect following in webhook delivery by adding redirect: "manual" to both fetch sites (pipeline/route.ts and testEndpoint in webhook.ts)
  • Rejects 3xx responses with a clear error message in the test endpoint path
  • Gated on DANGEROUSLY_ALLOW_WEBHOOK_INTERNAL_URLS for self-hosters who explicitly opt into trusting internal URLs

Test plan

  • Existing webhook tests pass (pnpm vitest run modules/integrations/webhooks/lib/webhook.test.ts)
  • New parameterized redirect rejection tests (301/302/303/307/308) pass
  • Manual: "Test Endpoint" with a redirect URL shows clear error in UI

@Dhruwang Dhruwang requested a review from pandeymangg April 27, 2026 09:39
@sonarqubecloud
Copy link
Copy Markdown

@Dhruwang Dhruwang merged commit bad3b7a into release/4.9 Apr 27, 2026
13 checks passed
@Dhruwang Dhruwang deleted the backport/fix-ssrf-webhook-redirect branch April 27, 2026 10:02
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.

2 participants