CORS Misconfiguration Checker

Which websites can read this API — and with whose cookies?

CORS is the browser’s rule for when one website may read another site’s responses — and a misconfigured policy can hand any website your users’ authenticated API responses. Enter a URL and this checker sends a real GET with a foreign Origin plus a real OPTIONS preflight, then scores the policy 0–100: a reflected origin with credentials, a wildcard with credentials, a null origin, and a missing Vary: Origin are the classic failures it looks for. For the headers themselves, use the Security Headers Checker; for sending test requests of your own, the Webhook Tester. The companion article CORS Misconfiguration Explained covers the same-origin policy, simple vs preflighted requests, and what to fix first.

Last updated:

1. The URL and the test Origin

🔒 The check sends only the URL and test Origin you enter to the SysOSX checker server, which fetches the URL twice and returns only its six CORS response headers for evaluation in your browser. No file is uploaded, no report is stored, the response body is never read, and the target is never fetched directly from your browser.

How a CORS policy is decided

A browser will only let a page read a response from another origin when that response opts in. The opt-in is the Access-Control-Allow-Origin header: `*` opens the response to every site, a specific origin opens it to that site only, and no header at all means the browser blocks the read. The check therefore starts by classifying the ACAO the server sent back for a foreign Origin — the Origin this tool sends, https://evil.example.com, is one no allowlist should contain, so an echo of it is proof the server reflects whatever Origin it is given.

Credentials change everything. Without credentials, a reflected origin only exposes unauthenticated responses — bad for a private API, fine for a public one. With Access-Control-Allow-Credentials: true, the browser also hands over the victim’s cookies and Authorization header, so any website can read the API as the victim. That combination — reflected origin plus credentials — is the critical finding, and it is also the reason a wildcard plus credentials is broken either way: browsers refuse to honour `*` with credentials, so the author either opened a public API to credentialed reads by accident or believed a combination that never worked.

The preflight is the browser’s second question, asked before any request that is not simple — a PUT or DELETE, a custom header, a JSON body. The OPTIONS request asks which methods and headers the server allows for this origin, and the answer is the Access-Control-Allow-Methods and Access-Control-Allow-Headers list. A preflight that redirects fails outright (browsers do not follow preflight redirects), and a preflight that allows PUT and DELETE to any origin hands every site write access. The checker sends a real preflight with Access-Control-Request-Method: GET and Access-Control-Request-Headers: authorization, content-type, and reports what comes back.

Two quieter failures round out the check. A missing Vary: Origin on a response whose ACAO depends on the request’s Origin lets a shared cache serve one site’s ACAO to another origin — cache poisoning by header. And Access-Control-Max-Age over a day (86,400 seconds) keeps a bad allowlist cached in browsers long after the server fixed it. Neither is an exploit on its own; both turn a small misconfiguration into a durable one. The score starts at 100 and deducts 10 per error, 4 per warning and 1 per info, capped per severity — and any error also raises the red dangerous-configuration banner, which is the headline, not the number.

What this checker does — and what it does not

The SysOSX checker server fetches the URL twice: a GET carrying the test Origin, following at most 3 redirects, and an OPTIONS preflight carrying the same Origin plus Access-Control-Request-Method: GET and Access-Control-Request-Headers: authorization, content-type, which never follows redirects. Only the six CORS response headers of each leg come back — Access-Control-Allow-Origin, Allow-Credentials, Allow-Methods, Allow-Headers, Max-Age, and Vary. The response body is never read, no credentials are ever sent, and your browser then classifies the origin, builds the findings and computes the score.

The default test Origin is https://evil.example.com — a clearly foreign origin that no allowlist should contain. You can replace it with your own site’s origin to test whether that origin is allowlisted: a reflected answer for your own origin is expected, a reflected answer for evil.example.com is not. The Origin is only ever sent as a header value; it is never fetched, and it must be a plain http(s) origin — no path, no query, no credentials, no non-default port.

The demos are labelled and local. The misconfigured demo is a built-in fixture, not a live site: a synthetic API that reflects evil.example.com with credentials on both legs, allows every method on the preflight, and sends no Vary — score 58, Needs work, dangerous-configuration banner. The locked-down demo is the opposite fixture: no ACAO anywhere and a 405 preflight — score 98, Excellent, clean banner. Both run entirely in your browser with no network, so the exact result never changes; the live check is the primary path, and the demos exist so the tool is demonstrable without depending on any third-party server’s CORS config staying put.

Be honest about what a CORS check can see

One check measures one Origin against one URL at one moment. An allowlisting server answers differently for different Origins — the same URL can allow your site and refuse evil.example.com — so a clean result for the tested Origin says nothing about the rest of the allowlist, and the allowlist itself is never audited: the checker sees what the server returns for the Origin it sent, not the list the server keeps. Test each Origin you care about separately.

The checker sees response headers, not the server’s allowlist logic, and CORS is a browser rule, not a server lock. Non-browser clients — curl, scripts, a server calling the same API — ignore CORS entirely and read whatever the server returns, so a “blocked” result never means the data is private; it means browsers will not hand it to a foreign page. A reflected origin with credentials is dangerous precisely because browsers enforce it the other way: the victim’s browser will hand the response to the attacker’s page.

The answer is the one the checker’s network location received. A CDN edge can cache a CORS response and serve it with a stale ACAO, a load balancer can route the GET and the preflight to different origins, and a server can vary its answer by header or geography — so re-check after a fix, and check the URL your visitors actually hit. The tool reports the headers as received; a header the server sends only sometimes is a header the tool sees only sometimes.

Key facts

OriginA scheme, host and port — https://app.example.com — that identifies where a page came from. The browser sends it as the Origin header on cross-origin requests, and the server decides whether to allow it.
Access-Control-Allow-Origin (ACAO)The response header that opts a response into cross-origin reads: `*` for every site, one specific origin for that site, or absent to block cross-origin reads. The checker classifies it as wildcard, reflected, allowlisted, null, absent or unparseable.
Access-Control-Allow-Credentials (ACAC)The response header that lets the browser expose a cross-origin response with the user’s cookies and Authorization header — only honoured together with a specific origin, never with `*`.
Preflight requestAn OPTIONS request the browser sends before a non-simple request (PUT/DELETE, custom headers, JSON bodies) to ask which methods and headers the server allows for this origin. Browsers do not follow redirects for preflight.
Vary: OriginThe response header that tells shared caches the response depends on the request’s Origin, so one site’s ACAO is never served to another origin. Missing it on an origin-specific response is a cache-poisoning risk.
Credentials modeWhether a cross-origin request carries cookies and Authorization headers. The browser only exposes the response when both sides opt in: the page asks for credentials and the server answers ACAC true with a specific origin.
Simple requestA GET, HEAD or POST with only safelisted headers and a simple content type — the kind the browser sends without a preflight. Everything else is preflighted first.
Null originThe literal origin `null`, sent by sandboxed iframes and data: URLs. An ACAO of `null` matches those contexts and bypasses origin checks — never allow it.

Frequently asked questions

My API returns Access-Control-Allow-Origin: * — is that a problem?

On its own, no: `*` without credentials is how a public API is meant to look, and browsers will still block credentialed reads against it. It becomes a problem in two cases: with Access-Control-Allow-Credentials: true, which browsers refuse to honour — so the combination is broken either way — and when the data is not public, because `*` lets any website read unauthenticated responses. If the API serves user-specific data, replace `*` with a static allowlist of the origins you actually serve.

The checker says my origin is reflected — what do I change?

Stop echoing the request’s Origin header. Replace the reflection with a static allowlist: check the incoming Origin against a fixed list of origins you serve, and only then send it back as the ACAO — or send a fixed ACAO for a single-origin API. If the endpoint needs credentials, the ACAO must be a specific origin (never `*`) and the response must carry Vary: Origin so caches never serve one site’s ACAO to another. Then re-check with the foreign Origin: it should get no ACAO at all.

Why does the checker send evil.example.com as the Origin?

Because the test is whether the server echoes an Origin it has no reason to trust. A server with a proper allowlist answers evil.example.com with no ACAO (or a different, allowlisted origin); a server that reflects its input answers with evil.example.com itself — and that echo is the vulnerability, since a real attacker’s page would send its own origin the same way. You can replace the test Origin with your own site’s origin to check the allowlisted case instead.