CORS Misconfigurations
CORS misconfigurations are a common security issue that can lead to cross-origin data theft and other attacks.
Common Misconfigurations
- Reflecting Origin header - Setting ACAO to the request Origin without validation
- Using null origin - Allowing
nullas a valid origin - Subdomain trust - Allowing all subdomains when only specific ones should be trusted
- Wildcard with credentials - Combining
ACAO: *withAllow-Credentials: true
Testing for CORS Misconfigurations
- Send a request with a different Origin header
- Check if the response includes permissive CORS headers
- Try various Origin values (subdomains, null, etc.)