SSRF
Cheat sheet · https://pcornel.dk/topic.php?topic=4759
Answer
SSRF (server-side request forgery) tricks a web server into making requests to internal services or cloud metadata, such as 169.254.169.254. Validate and allow-list URLs and block internal addresses at the network.
Remember
- Block internal ranges and metadata IPs.
- Allow-list destinations.
- Add network egress controls.
First checks
- Outbound request allowlist — destinations
curl -s 'https://<app>/fetch?url=http://169.254.169.254/'— SSRF test (authorised)- IMDSv2 required (AWS) — metadata protection
Verify in this order
user URL → validation/allowlist → outbound request
Where it usually breaks
First mismatch in asset/subject identity → trust/authentication → authorization/policy → enforcement/control → telemetry/detection → protected outcome/response; preserve identity/policy/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4759