#0312
A Node.js service exposes a /fetch endpoint that accepts a URL and retrieves its content — intended for fetching external RSS feeds.
The implementation does not validate whether the URL points to internal or cloud-metadata addresses. On AWS, Azure, and GCP, the metadata endpoint at 169.254.169.254 exposes IAM credentials, instance identity, and secrets.
This SSRF pattern was central to the 2019 Capital One breach (CVE-2019-3799) and remains one of the most impactful vulnerability classes in cloud environments.
On any cloud provider, the metadata endpoint at 169.254.169.254 exposes temporary IAM credentials that give full API access to the instance's role — account takeover in one request.
fetchUrl(url) so it blocks requests to private IP ranges: 169.254.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, and 127.0.0.0/8.localhost and 0.0.0.0 by hostname.'SSRF: blocked' for disallowed targets.await fetchUrl('http://169.254.169.254/latest/meta-data/iam/security-credentials/')// → throws Error('SSRF: blocked')
await fetchUrl('https://example.com/feed.xml')// → returns response body string
url, net, dns). No npm packages.