pentesting, updated
Testing for client-side URL redirect
Check whether a client-side redirect/forward can be pointed at an attacker-controlled destination.
Goal
Confirm redirect targets are validated against an allowlist, not accepted as-is from user input.
How to test
curl -sI "https://example.com/redirect?url=https://evil.com"
curl -sI "https://example.com/redirect?url=//evil.com" # protocol-relative bypass
curl -sI "https://example.com/redirect?url=/\evil.com" # backslash bypass
What to look for
A Location header (or a client-side window.location assignment) pointing at the attacker’s domain.
Notes
Open redirects are a frequent building block for phishing and for strengthening an OAuth redirect_uri attack — note it even if the app treats it as low severity.
References
- OWASP WSTG-CLNT-04 — Testing for Client Side URL Redirect.