SiteShadow
Back to vulnerability library

CWE-918 SSRF

What this means

SiteShadow flagged code where the server makes outbound requests to a destination influenced by untrusted input (URL parameters, request body, headers, webhook data).

Why it matters

SSRF can expose internal services or cloud metadata.

Safer examples

1) Allowlist destinations (recommended)

const allowedHosts = new Set(["api.stripe.com", "webhook.partner.com"]);
const u = new URL(req.body.url);
if (!allowedHosts.has(u.host)) throw new Error("Destination not allowed");

2) Block private/metadata ranges and handle redirects safely

Block localhost, RFC1918, link-local, and cloud metadata; limit redirects and prevent DNS rebinding where feasible.

3) Apply tight outbound controls

How SiteShadow detects it (high level)

References

---

← Back to Vulnerability Library

Request access View coverage