Meta Refresh Redirect
This lab demonstrates open redirect vulnerabilities that occur when HTML meta refresh tags are used for redirects without proper validation of the target URL.
Objective: Test meta refresh-based redirects and understand how HTML-based redirects can be exploited.
$redirect_url = $_GET['url'] ?? ''; $delay = $_GET['delay'] ?? 3; // Vulnerable: No validation of the redirect URL // HTML will generate: // <meta http-equiv="refresh" content="$delay;url=$redirect_url">
url, delayTry these URLs to test the vulnerability:
?url=https://evil.com&delay=1?url=//evil.com&delay=2?url=javascript:alert('XSS')&delay=1?url=data:text/html,&delay=1?url=ftp://evil.com&delay=3?url=file:///etc/passwd&delay=2