Loading...
Loading...
Cookies missing `Secure`, `HttpOnly`, or `SameSite` flags can be stolen or abused.
1. Missing `Secure`: Plaintext theft. 2. Missing `HttpOnly`: XSS theft. 3. Missing `SameSite`: CSRF attacks.
Always enforce `SameSite=Lax` (or Strict) for session cookies. Use `__Host-` prefix for maximum security.
Log in, inspect the `Set-Cookie` response headers, and verify every session or auth cookie has `Secure`, `HttpOnly`, and `SameSite`. Missing flags on ancillary cookies (preferences, language) are lower priority but should still be audited.
curl -sI -X POST -d "user=x&pass=x" https://yourdomain.com/login | grep -i set-cookieDevTools → Application → Cookies → your domain → check Secure / HttpOnly / SameSite columns`Lax` for the primary session cookie. It permits top-level navigations (so clicking an email link that lands on your site still sees the session) but blocks cross-site POSTs, which is the CSRF vector. `Strict` breaks that link flow and causes user confusion.
`__Host-` is stricter: requires Secure, requires Path=/, forbids Domain. Use it for the session cookie. `__Secure-` only requires Secure; use it when you need a Domain attribute (e.g., cookies shared across subdomains).
On every cookie the frontend does not need to read from JavaScript. Session IDs, auth tokens, and CSRF tokens: yes. UI preferences like theme or language: no - those benefit from JS access.
Applied the configuration change? Run a live scan to confirm the vulnerability is patched.