SSRF
Making a server fetch a URL of the attacker's choosing, reaching internal services or cloud metadata the attacker cannot reach directly.
SSRF appears wherever a server fetches user-supplied URLs: webhooks, link previews, PDF renderers, image importers. The attacker points it at http://169.254.169.254/ (cloud metadata), localhost admin ports or internal APIs, and the request comes from inside the network with the server's trust. The 2019 Capital One breach used SSRF to read IAM credentials from EC2 metadata.
Blocklisting strings fails: decimal and octal IPs, IPv4-mapped IPv6 (::ffff:169.254.169.254), redirects and DNS rebinding (a name that resolves to a public IP at check time and a private one at fetch time) all bypass it.
Robust fixes: resolve the name once, validate the resolved IP against private and link-local ranges, connect to that exact IP, disable or re-validate redirects, and route fetches through an egress proxy with its own allow-list. On AWS, enforce IMDSv2.
Learn it properly
Compared
Also used in
- AI in the security SDLCSecEng · AI, vibe coding & logic structuringFree
- TLS and PKI in practiceSecEng · Network & Infrastructure SecurityFree
- Secure SDLC: where each scanner earns its keepSecEng · Application Security & DevSecOpsFree
- Server-side request forgery for defendersSecEng · Offensive web security for defendersFree
- Agent tool sandboxing and least privilegeSecEng · AI & LLM security engineeringPro
- Model and data supply chain, and output handlingSecEng · AI & LLM security engineeringPro
- Design an SSRF-safe URL fetcher in GoLLD · Problems: parsing and sandboxing componentsPro
- Investigating AWS CloudTrailAnalyst · Cloud & identity incident responsePro