CORS Misconfigurations (Real-World Impact)
On this page
Common Mistakes
- Reflecting Origin header.
- Allowing credentials with wildcard.
Safe Pattern
Access-Control-Allow-Origin: https://app.example.com Access-Control-Allow-Credentials: true
Test
curl -X OPTIONS https://api.example.com -H "Origin: https://evil.example"
Failure Modes
- Missing Vary: Origin header.