Vendor Audit

CORS (Cross-Origin Resource Sharing)

Cross-Origin Resource Sharing (CORS) headers tell the browser which other origins are allowed to read responses from your site. A misconfigured CORS policy can let a malicious site read your authenticated API responses — turning a same-origin protection into a cross-origin information leak.

How CORS works

The Same-Origin Policy (SOP) is one of the foundational web security boundaries: a script on attacker.example can't read responses from victim.example, even if the user is logged in. CORS is the explicit relaxation of that boundary — your server can send Access-Control-Allow-Origin (ACAO) headers to authorise specific other origins to read its responses. Misconfigurations turn a protection into a leak.

The dangerous patterns are well-known. ACAO: * allows any origin to read responses, which is fine for genuinely public APIs but disastrous for anything authenticated. ACAO: * combined with Access-Control-Allow-Credentials: true is so dangerous that browsers reject it at runtime — but a server that emits the combination indicates the operator believes credentialed cross-origin reads are acceptable, which they almost never are. ACAO: null trusts sandboxed iframes and other null-origin contexts, which an attacker can trigger from a page they control. Reflective ACAO (echoing whatever Origin: the client sends) is effectively the same as allowing all origins, just slower.

The right configuration is to allowlist specific origins. ACAO: https://app.example.com (one origin per response, varied per request based on a server-side allowlist). If you support multiple origins, the server inspects the request's Origin: header, checks it against an explicit allowlist, and echoes it back only on match. Add Vary: Origin so caches don't serve one origin's response to another. For credentialed cross-origin reads, also set Allow-Credentials: true — but only on responses to specific allowlisted origins, never with ACAO: *.

Vendor Audit makes a single GET against the homepage with an Origin: header and inspects the response. Findings cover the four high-risk patterns (wildcard with credentials, null, reflective, broad wildcard) and the safe baseline (no CORS headers — meaning the browser refuses cross-origin reads, which is the secure default). Sites that legitimately need CORS for their own subdomains or partners will still pass this check as long as they enumerate allowed origins rather than wildcard them.

How to fix it

Use Access-Control-Allow-Origin: <specific origin>, never *, especially when Allow-Credentials: true is set. Avoid reflective ACAO that echoes the request's Origin header.

The 1 CORS check Vendor Audit runs

Each check has a fixed set of results, and each result has one rating. These are the exact words the report uses.

CORS configuration

Standard: WHATWG Fetch

Related

Cookies · Security headers