Back to Introduction
Medium Risk
Wiki Entry
Permissive CORS Configuration
Your site allows requests from any origin (Access-Control-Allow-Origin: *). This is too permissive and can expose your API to unauthorized access.
Why This Matters
With a wildcard CORS policy, any website can make requests to your API. This can lead to data theft, unauthorized actions, or abuse of your API by malicious sites.
How to Fix
Framework-specific solutions and general best practices
Configure CORS to only allow specific trusted domains. Replace 'Access-Control-Allow-Origin: *' with specific domains like 'Access-Control-Allow-Origin: https://yourdomain.com'.
Quick Reference
Severity
Medium Risk
ID
cors_misconfiguredAI Assistant Prompt
Copy this prompt to ask an AI for help fixing this vulnerability:
Please fix the "Permissive CORS Configuration" security vulnerability in this web application. The issue is: Your site allows requests from any origin (Access-Control-Allow-Origin: *). This is too permissive and can expose your API to unauthorized access. Make a plan and implement based on my project.