Cookie security
Cookies should be marked Secure, HttpOnly, and SameSite, and ideally use the __Host- or __Secure- prefix. Missing flags leak session cookies over HTTP, expose them to JavaScript-based theft, or allow cross-site request forgery (CSRF).
How Cookies works
The cookie attribute set has expanded significantly over the past decade. Secure prevents the cookie from ever being sent over a plain-HTTP connection, closing the leakage path even if HSTS hasn't yet been seen by the browser. HttpOnly prevents JavaScript from reading the cookie via document.cookie, blocking the most common XSS-to-session-theft chain. SameSite controls cross-site request inclusion, mitigating CSRF.
SameSite has three values. Strict means the cookie is sent only on requests originating from the same site; this is the safest but breaks some cross-site flows like an OAuth callback. Lax sends the cookie on top-level cross-site GET navigations but not on POST or sub-resource requests; this is the modern default and balances security with usability. None requires the cookie to opt explicitly into cross-site contexts and forces Secure to be set.
The __Host- and __Secure- name prefixes are commitments enforced by the browser. A cookie named __Host-session must have Secure, no Domain attribute, and Path=/ — the browser refuses to set the cookie if any of those are violated. This protects against subtle attacks where an attacker sets a same-named cookie from a sibling subdomain and the browser sends both to your application. For session cookies specifically, __Host- is the modern best practice.
A Set-Cookie header does not stop a response being cached (RFC 9111). If the response that sets a session cookie is marked cacheable by shared caches (public, s-maxage, a max-age above zero, or a future Expires) and has no private or no-store, a CDN or corporate proxy can store it and hand the same cookie to the next visitor.
Vendor Audit observes only the cookies set on the homepage response. Cookies set after authentication or by JavaScript don't appear in this view. A clean homepage cookie audit doesn't guarantee all of your cookies are well-configured — but a flagged homepage cookie is a clear sign the application has at least one misconfigured cookie path.
How to fix it
When setting cookies, always include Secure; HttpOnly; SameSite=Lax (or Strict) and use the __Host- prefix for session cookies.
The 5 Cookies checks Vendor Audit runs
Each check has a fixed set of results, and each result has one rating. These are the exact words the report uses.
Cookie Secure
Standard: RFC 6265
- PASSAll cookies set the Secure flag
- MediumSome cookies are missing the Secure flag
Cookie HttpOnly
Standard: RFC 6265
- PASSAll cookies set HttpOnly
- MediumSome cookies are missing HttpOnly
Cookie SameSite
Standard: RFC 6265bis
- PASSCookies set SameSite=Lax or Strict
- LowSome cookies have no usable SameSite attribute
- InfoSome cookies use SameSite=None (cross-site embed)
Cookie name prefixes
Standard: RFC 6265bis
- PASSCookies use __Host-/__Secure- prefixes correctly
- LowA cookie uses a __Host-/__Secure- prefix without meeting its rules
Cache-Control on cookie responses
Standard: RFC 9111 §3, §5.2.2
What it checks. Whether the response that sets the site's cookies lets shared caches (CDNs, corporate proxies) store it.
Why it matters. A Set-Cookie header does not stop caching (RFC 9111 §7.3). If a shared cache stores the response, it can hand one visitor's session cookie to the next.
How to fix it. Send Cache-Control: private or no-store on responses that set cookies.
- PASSThe response that sets cookies does not let shared caches store it
- LowThe response that sets cookies may be stored by shared caches and served to other visitors (RFC 9111)