Session cookies set without proper attributes risk cleartext interception, XSS exfiltration, or CSRF submission. The scanner parses every Set-Cookie header returned across crawled routes.
| Rule ID | Condition detected | Fix |
|---|---|---|
COOKIE-NO-SECURE | Cookie issued over HTTPS without the Secure attribute | Add Secure so browsers never transmit the cookie over HTTP. |
COOKIE-NO-HTTPONLY | Session-like cookie readable by document.cookie | Add HttpOnly unless client JavaScript explicitly needs to read it. |
COOKIE-SAMESITE-NONE-INSECURE | SameSite=None set without Secure | Modern browsers reject or downgrade insecure SameSite=None cookies. |
COOKIE-NO-SAMESITE | Cookie omits SameSite attribute | Set SameSite=Lax or SameSite=Strict to limit CSRF exposure. |
web-vuln-scanner https://app.example.com --max-pages 15 --view security
web-vuln-scanner https://app.example.com -H "Cookie: session=$SESSION" --auth-context signed-in
The audit also pairs cookie checks with Cache-Control: no-store checks so authenticated pages are not cached by shared proxies.
UI preference cookies read by frontend scripts cannot use HttpOnly. The scanner weights HttpOnly severity specifically on session and auth-named cookies.
SameSite=Lax blocks cross-site POST requests while still allowing top-level GET links back into the application. Use Strict for admin portals when external deep links do not need session state.
Check Cache-Control, HSTS, and framing headers on the same routes.
Cross-origin requests interact directly with SameSite=None cookies.
Check whether session tokens or JWT claims leak in HTML or JS responses.