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
CORS misconfiguration: how to hunt it
Where to look
- Access-Control-Allow-Origin reflecting any Origin with Allow-Credentials: true, and session cookies sent cross-site (SameSite=None).
- Origin checks fooled by a suffix, a prefix or the null origin (sandboxed iframes, local files).
- Trusted subdomains where an XSS would make the policy exploitable.
- Endpoints that return tokens, API keys or personal data to a signed-in user.
What proves it
Give a page that, opened by a signed-in test user, reads their private data from the target and shows it, and name the data exposed.
Read further
Writeups on CORS misconfiguration, by hunters and researchers, most with a short summary.
Related classes