Server-Side Request Forgery (SSRF)
The server fetches an attacker-controlled URL, enabling internal network access, cloud metadata theft, and request forgery.
Overview
Features that fetch a URL - webhooks, link previews, image/avatar fetchers, PDF/screenshot renderers, document import - can be pointed at internal services or cloud metadata (169.254.169.254). Allowlists are bypassed with DNS rebinding, redirects, decimal/octal/IPv6 IPs, and alternate schemes.
How it works
Features that fetch a URL - webhooks, link previews, image/avatar fetchers, PDF/screenshot renderers, document import - can be pointed at internal services or cloud metadata (169.254.169.254). Allowlists are bypassed with DNS rebinding, redirects, decimal/octal/IPv6 IPs, and alternate schemes.
Example
Impact
Cloud IAM credential theft, internal port scanning and pivoting, reading local files via file://, and protocol smuggling via gopher://.
Detection
Inject per-target unique out-of-band (OAST) URLs into URL-shaped parameters and correlate DNS/HTTP callbacks; on a hit, probe cloud metadata endpoints and grade by what reflects.
Prevention
- Resolve and validate the destination IP, blocking RFC1918, link-local and metadata ranges - re-validate after redirects.
- Use an allowlist of permitted hosts/schemes; deny by default.
- Disable unused URL schemes (file, gopher, dict) in the fetch client.
- Enforce IMDSv2 and network egress controls on cloud hosts.