Preventing SSRF in Backend Services That Fetch User-Supplied URLs
Features that fetch a URL supplied by a user appear in webhook testers, image importers, link previewers, document converters, and integration platforms. They also create a server-side request forgery (SSRF) boundary: an attacker can try to make the backend send requests to destinations the attacker cannot reach directly.
A secure design needs more than a blacklist of suspicious strings.
Understand the trust boundary The dangerous capability is not URL parsing itself. It is allowing untrusted input to influence a network connection made with the server’s network identity.