How to fix: Cookie Missing SameSite Attribute
A cookie is set without the SameSite attribute. Without SameSite, the cookie is sent on all cross-site requests (or defaults to SameSite=Lax in modern browsers), potentially enabling CSRF attacks.
Why it matters
Without SameSite=Lax or Strict, cross-site POST requests (CSRF attacks) carry the session cookie. Older browsers that do not enforce a default SameSite will include the cookie in every cross-origin request.
SameSite controls whether a cookie is sent with cross-site requests. SameSite=Strict prevents the cookie from being sent on any cross-site request. SameSite=Lax (the browser default in Chrome) allows top-level navigation GET requests but blocks cross-site POST. Explicitly setting SameSite is more portable than relying on browser defaults.
How to fix it
- 1Add SameSite=Lax for most session cookies (allows OAuth redirects and link clicks to work).
- 2Add SameSite=Strict for admin or high-privilege cookies where cross-site navigation should not carry the session.
- 3Add SameSite=None; Secure only for cookies explicitly needed in third-party contexts.
Code examples
SameSite=Lax (recommended default)
Set-Cookie: __Host-session=abc123; HttpOnly; Secure; SameSite=Lax; Path=/SameSite=Strict (high-privilege)
Set-Cookie: __Host-admin-token=xyz; HttpOnly; Secure; SameSite=Strict; Path=/adminReferences
Detected automatically by VulnRadar. The check id is cookie-samesite-missing, stable across every scan so you can filter or diff on it.
More cookies checks
- LowCookie Domain Attribute Is Too Broad
- LowCookie Missing Secure Attribute
- InfoThird-Party Cookie Missing Partitioned Attribute
- High__Host- Prefix Cookie Missing Secure Attribute
- High__Host- Prefix Cookie with Non-Root Path
- High__Secure- Prefix Cookie Missing Secure Attribute
- LowCookie Expires/Max-Age Exceeds 1 Year
- InfoCookie Name Leaks Framework or Language
Questions
- How severe is Cookie Missing SameSite Attribute?
- VulnRadar rates this medium severity in the cookies category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id cookie-samesite-missing, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Cookie Missing SameSite Attribute map to?
- It maps to CWE-1275. In the OWASP Top 10 it falls under A05:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.