wacrm/src
Arnas Donauskas 44183bc750 fix(whatsapp): guard the template image-header fetch against SSRF
`ensureImageHeaderHandle` fetched the caller-supplied `header_media_url`
server-side with no validation, so a template submit — an action any
authenticated member can perform — could reach loopback, RFC1918 and
cloud-metadata addresses, with the response status and content-type
echoed back through the thrown error.

Wire in the project's existing `isDeliverableUrl` guard, which the two
other outbound-fetch call sites (webhook delivery, automation
`send_webhook`) already use, and reuse their `redirect: 'manual'` +
timeout so a public URL can't 3xx-bounce to an internal one. The
rejection reuses the unreachable-host message verbatim so the failure
doesn't distinguish "blocked" from "down".

Addresses GHSA-6fr5-pxw7-r3xw.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 13:07:09 +03:00
..
app fix(settings): wrap useSearchParams pages in Suspense so nav works in prod 2026-07-17 15:08:25 +03:00
components feat(automations): dispatch tag added triggers 2026-07-16 00:26:21 -06:00
hooks Merge pull request #322 from RiadDeveloper/main 2026-07-01 11:27:20 +03:00
i18n feat: add fallback logic for missing locale dictionaries and update NextIntlClientProvider configuration 2026-07-02 08:42:37 -04:00
lib fix(whatsapp): guard the template image-header fetch against SSRF 2026-07-28 13:07:09 +03:00
types feat: WhatsApp interactive messages (reply buttons + lists) 2026-07-08 19:03:15 +03:00
middleware.test.ts fix(auth): preserve refreshed Supabase cookies across middleware redirects 2026-06-23 10:08:05 +03:00
middleware.ts fix(auth): preserve refreshed Supabase cookies across middleware redirects 2026-06-23 10:08:05 +03:00