Test open redirect checks

Open redirectDiscovery

Written with a model's help from “Why 'contains our hostname' fails as an open redirect check” by Rocky on DEV (bugbounty). Read the writeup before relying on it.

When testing for open redirects, try sending a next parameter with a URL that contains the target's hostname in a subdomain, query string or userinfo part, such as https://target.com.evil.example/, https://evil.example/?target.com or https://target.com@evil.example/. Also test with a URL that starts with a slash, like //evil.example/, and with a relative path, like /\evil.example/. A secure check should reject these and only allow URLs with a trusted hostname, such as https://target.com/path. Look for a redirect to an attacker-controlled page in the response, such as a page on attacker.example.

http
GET /login?next=https://target.com.evil.example/ HTTP/1.1
Host: target.com

Follow #open-redirect or #url-validation for new tips like this one, on your notifications page and, if you choose, in a daily or weekly email.

Comments

No comments yet.