Tools / Cookie security

Cookie security checker

Inspect the Set-Cookie attributes returned by a public page. Cookie values are never displayed in the result.

Attributes checked

Only cookies set by one unauthenticated GET are visible. A cookie's correct settings depend on its purpose and the application flow.

What each attribute actually stops

The three main attributes defend against three different attacks, and setting one does nothing for the others:

Choosing a SameSite value

Two caveats worth knowing. Lax still permits cross-site GET navigations, so any state-changing endpoint reachable by GET remains forgeable — another reason not to mutate state on GET. And because Lax-by-default is browser behaviour rather than something you declared, relying on it means relying on the user's browser version; set the attribute explicitly.

SameSite is not a complete CSRF defence

It is a strong mitigation, not a replacement for anti-CSRF tokens. It does nothing against a same-site attacker — a vulnerable or user-controlled subdomain counts as same-site, since SameSite is scoped to the registrable domain rather than the origin. An XSS anywhere under your domain is unaffected by it. Keep tokens on state-changing endpoints and treat SameSite as defence in depth.

Cookie prefixes: __Host- and __Secure-

Prefixes move guarantees from policy into something the browser enforces for you, which is why they are a genuine upgrade rather than a convention:

Cookie-overwriting ("cookie tossing") from a subdomain is an underrated attack, and __Host- is the cheapest defence against it. If a cookie does not need to be shared across subdomains, prefix it.

Scope, lifetime and the rest

Reading your result

This check sees only the cookies set by a single unauthenticated GET, which on most sites means consent, analytics and load-balancer cookies rather than the session cookie that appears after login. A missing HttpOnly on an analytics cookie read by design from script is not a finding; the same gap on a session token is. Values are never displayed or stored.

Related checks: security headers analyzer and CORS policy checker. For session handling behind a login, we test authentication and session management end to end.

Frequently asked questions

Which SameSite value should I use for a session cookie?

Lax suits most login sessions: the cookie is sent when someone follows a link to your site, but not on cross-site form posts or background requests. Use Strict for high-value actions such as banking, and None; Secure only when the cookie must work inside another site, such as an embedded widget.

Why does the checker not show my login cookie?

It makes one request as a visitor who is not signed in, so it only sees cookies set on that first page load. Session cookies issued after login need checking in your browser’s DevTools (Application → Cookies) while signed in.

What is the __Host- cookie prefix?

A cookie named __Host-something is accepted by the browser only if it has Secure, Path=/ and no Domain attribute. That locks it to the exact host, so a compromised subdomain cannot overwrite it.

Can the checker see my cookie values?

Values are not shown in the report. It lists each cookie’s name and attributes, which is all you need to fix the configuration.