CSACyber Security AuditWebbandflow
HTTP security headers

Cross-Origin Resource Sharing (CORS)

A browser mechanism that controls which other websites may read responses from your site's resources.

What it is

Browsers normally stop a page on one site from reading data served by another site. CORS is the controlled way to relax that rule, letting a server state which other origins may access its resources. Misconfigured CORS, such as trusting any origin together with credentials, can expose data to malicious sites.

Why it matters

An overly permissive CORS policy can let attacker-controlled sites read sensitive data from your application on behalf of logged-in users.

How to fix it

Allow only specific, trusted origins, avoid reflecting arbitrary origins, and never combine a wildcard origin with credentialed requests.

Related terms

References

← Back to the glossary