Test Origin header validation

CORS misconfigurationDiscovery

Written with a model's help from “First Bug Report, First Duplicate. What a Way to Start!” by Swati Choudhary on at0625309 (Medium). Read the writeup before relying on it.

When testing a web application, try modifying the Origin header using a tool like Burp Suite to see if the server reflects the supplied value. If it does, investigate further to determine if the application is using a weak validation check, such as startsWith(), which could allow an attacker to bypass origin restrictions. For example, if the application trusts origins beginning with https://target.com, try using an origin like https://target.com.attacker.example to see if it is accepted. Look for responses that include headers like Access-Control-Allow-Origin and Access-Control-Allow-Credentials to determine the potential impact of the weakness. To confirm the vulnerability, try to make an authenticated request from an attacker-controlled website and see if you can read sensitive information from the response.

Follow #authentication or #cors for new tips like this one, on your notifications page and, if you choose, in a daily or weekly email.

Comments

No comments yet.