Skip to main content
QUIETLYTIC
Cybersecurity

CORS Analyzer

Check a set of CORS response headers for the combinations that undo them.

Local · nothing leaves this browser Waiting for input
Esc Clear
CORS

Paste the response headers on the left.

How it works

CORS does not protect a server. It relaxes a browser rule — the same-origin policy — that would otherwise stop one site reading another's responses. Every CORS header is therefore a grant, and the question worth asking of one is what it gives away rather than what it defends.

The combination that matters

A wildcard origin is fine for genuinely public data and a disclosure for anything that varies by user or by network position — an internal API readable by any page an employee visits is the usual case. Credentials change the stakes entirely: with Access-Control-Allow-Credentials: true, cookies ride along and the allowed origin reads the authenticated response.

Why a reflected origin looks identical to a safe one

A server that echoes back whatever Origin it received produces a response indistinguishable from one naming a single trusted site. From headers alone that distinction cannot be made, so a specific origin is reported as scoped with that caveat attached. Send the request again with a different Origin header — if the response changes to match, the allowlist is everything.

Vary: Origin is not cosmetic

Without it a shared cache stores one origin's response and serves it to another. Where the origin is reflected, that turns a CDN into a way of handing one site the headers meant for a different one.

Example

Access-Control-Allow-Origin: null is the most dangerous single value here. Any sandboxed iframe sends Origin: null, and any site can create one — so this allowlists an origin an attacker produces on demand. It is almost always the accidental output of reflecting an Origin the server did not expect.

Frequently asked questions

Is a wildcard Access-Control-Allow-Origin always wrong?

No. It is correct for genuinely public data. It is a disclosure for anything that varies by user or by network position — an internal API readable by any page an employee visits is the common case.

Why is Access-Control-Allow-Origin: null treated as critical?

Any sandboxed iframe or data: URL sends Origin: null, and any site can create one. The value allowlists an origin an attacker produces on demand, and it is normally the accidental result of reflecting an unexpected Origin.

Can this tell whether the server reflects the Origin header?

No, and neither can any single response. A reflected origin is identical to a fixed one from the headers alone. Send the request again with a different Origin — if the response follows it, the allowlist is everything.

Why does Vary: Origin matter?

Without it a shared cache can store the response for one origin and serve it to another. Where the origin is reflected, that turns a CDN into a way of handing one site the headers meant for a different one.

What does allowing credentials actually change?

Cookies and authorisation headers are sent with the cross-origin request and the response becomes readable by the allowed origin. Every origin trusted becomes trusted with the authenticated response, not just with public data.

Related tools

From the intelligence desk