HTTP Cookie & SameSite Security Inspector

Inspect HTTP Set-Cookie response headers for essential security flags including Secure, HttpOnly, SameSite, and expiration policies.

RFC 6265bis HTTP Cookie Security Standards

HTTP state management cookies defined by IETF RFC 6265bis are small key-value strings stored by web browsers to persist user authentication sessions, shopping carts, and site preferences. Because cookies often store sensitive session tokens, missing security attributes expose web applications to severe vulnerabilities.

Critical Cookie Security Flags Explained

  • Secure Flag: Directs the browser to only transmit the cookie over encrypted HTTPS connections. Prevents man-in-the-middle (MitM) eavesdropping over unencrypted WiFi.
  • HttpOnly Flag: Blocks client-side JavaScript (document.cookie) from accessing the cookie. Prevents Cross-Site Scripting (XSS) session token theft.
  • SameSite Attribute: Controls whether cookies are transmitted with cross-site requests:
    • SameSite=Strict: Cookie is never sent on cross-site requests (highest CSRF protection).
    • SameSite=Lax: Cookie is sent on top-level safe GET navigations (recommended default).
    • SameSite=None; Secure: Required for third-party cross-site embeds and iframes.

Recommended Set-Cookie Production Header

Set-Cookie: session_id=xyz123; Path=/; Secure; HttpOnly; SameSite=Lax; Max-Age=86400

Domain & Security Tool Suite

Perform comprehensive security checks:

Frequently Asked Questions

What happens if SameSite is omitted in modern browsers?

Modern Chromium browsers (Google Chrome, Microsoft Edge) automatically apply a default policy of SameSite=Lax if the attribute is omitted, but explicitly declaring it is required for cross-browser consistency.

Can an HTTP site set a Secure cookie?

No. Under modern browser security specifications, browsers reject Set-Cookie directives containing the Secure flag if received over an insecure plaintext HTTP connection.