How this template works
The template uses API selection filters to specify the criteria for selecting the API requests to be executed. In this case, the filters are based on the response code and URL. The filter checks if the response code is equal to 302 (redirect) and if the URL matches a regular expression pattern. It also extracts a variable called "urlVar" from the URL.
The template defines a single request to be executed. It modifies the URL by replacing the protocol (http or https) with "http://evil.com" using a regular expression. It then disables following redirects for this request.
After executing the request, the template validates the response. It checks if the response code is equal to 302 (redirect) and if the response headers contain the key "location" with a value that contains either "evil.com". This validation ensures that the request was redirected to a URL containing "evil.com", indicating a potential open redirect vulnerability.
Frequently asked questions
What is the purpose of injecting 'evil.com' into the URL path in this test
How does this test help in detecting and mitigating open redirect vulnerabilities
What are the potential risks associated with open redirect vulnerabilities
Why is it important to ensure robust protection against open redirect vulnerabilities
What category and severity level does this vulnerability fall under
What are some references or resources that provide more information about open redirect vulnerabilities