Web & application

SameSite

A cookie attribute (Strict, Lax or None) controlling whether the browser sends the cookie on requests initiated by other sites.

SameSite=Strict sends the cookie only on same-site requests. Lax also sends it on top-level GET navigations from other sites (following a link), and is the default in Chromium when the attribute is missing. None sends it everywhere and requires Secure.

It blunts CSRF because a cross-site form POST arrives without the session cookie. But site means registrable domain (eTLD+1), so evil.example.com is same-site with app.example.com; a compromised or user-controlled subdomain bypasses it. GET endpoints that change state also bypass Lax.

Pair it with the __Host- prefix, Secure and HttpOnly, and keep a CSRF token or Fetch Metadata check for defence in depth.

httphttp
Set-Cookie: __Host-session=9f2c...; Path=/; Secure; HttpOnly; SameSite=Lax

Learn it properly

Also used in

Related terms