-
Notifications
You must be signed in to change notification settings - Fork 0
π‘οΈ Sentinel: [CRITICAL] Fix Server-Side Request Forgery (SSRF) in webhooks #627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -266,7 +266,7 @@ r = await req(`/api/orgs/${orgAId}/export`, { headers: oauth }); | |
| assert.equal(r.status, 403, 'non-owner export β 403'); | ||
|
|
||
| // ---- Webhooks ---- | ||
| r = await req(`/api/orgs/${orgAId}/webhooks`, { method: 'POST', headers: auth, body: body({ url: 'http://127.0.0.1:9/hook', events: ['project.update'] }) }); | ||
| r = await req(`/api/orgs/${orgAId}/webhooks`, { method: 'POST', headers: auth, body: body({ url: 'http://example.com:9/hook', events: ['project.update'] }) }); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π΄ Webhook delivery test breaks on switch to remote host The webhook URL was changed from Prompt for agentsWas this helpful? React with π or π to provide feedback. |
||
| assert.equal(r.status, 200, 'create webhook'); | ||
| const wh = await r.json(); | ||
| assert.ok(wh.secret.startsWith('whsec_'), 'webhook secret returned once'); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π¨ Webhook SSRF filter bypassable via IP encodings and DNS
isSafeWebhookUrlrejects only dotted-decimal private ranges,localhost, and[::1], matching the raw hostname string rather than the resolved address. Integer/hex IPs (http://2130706433/), non-[::1]IPv6 loopback and IPv4-mapped forms, and any public hostname whose DNS resolves to an internal or169.254.169.254metadata address all pass, andsendWebhookthen fetches them server-side.Was this helpful? React with π or π to provide feedback.