Basic URL Parameter Redirect
This lab demonstrates a basic open redirect vulnerability where user input is directly used in a redirect without any validation or sanitization.
Objective: Test various redirect URLs to understand how open redirect vulnerabilities work.
$redirect_url = $_GET['url'] ?? '';
if (!empty($redirect_url)) {
// Vulnerable: No validation of the redirect URL
header("Location: " . $redirect_url);
exit();
}
urlTry these URLs to test the vulnerability:
?url=https://evil.com?url=//evil.com?url=javascript:alert('XSS')?url=data:text/html,?url=ftp://evil.com