SSRF in Node.js: how a user-supplied URL reaches your cloud
Server-side request forgery (SSRF) in Node.js usually starts with a helpful feature. A link preview, a webhook tester, an "import from URL" button, a PDF renderer that fetches images. The server takes a URL from the user and fetches it. The user picks the URL, but the request leaves from inside your network, with your server's reach.
That reach is the problem. From the outside an attacker cannot talk to your admin service on 10.0.3.7, your Redis on localhost, or the cloud metadata service at 169.254.169.254. Your server can, and an SSRF bug lets the attacker borrow it.
This post walks through the Node.js shapes of SSRF, the fixes that hold up (and the ones that do not), and what Vulkro checks in your code.
