Skip to main content

Overview

Cookies carry session tokens, auth data, and preferences. Missing or misconfigured flags expose them to theft, fixation, and cross-site attacks.

Check Cookies

Browser DevTools

Application → Cookies → inspect flags per cookie.

HttpOnly

Secure

SameSite

Domain

Risk: Broad domain scope → XSS on any subdomain can steal cookie.

Path

Risk: Path is NOT a security boundary — JavaScript from other paths can read it via iframe tricks.

Expires / Max-Age


Vulnerability Matrix


Exploitation

CSRF (SameSite=None)

If Domain=.target.com and XSS on blog.target.com:

Session Fixation

If application accepts session ID from URL or doesn’t regenerate after login:
Victim logs in → attacker uses known session ID.

Prevention Check

  1. Login with session X
  2. After login, check if session ID changed
  3. If same → session fixation vulnerable

Modern browsers support special prefixes:
__Host- prevents subdomain and path scoping attacks.

Reporting Checklist


Quick Reference


Sources