Skip to main content
MediumCookiesOWASP A05:2021CWE-1275

How to fix: Third-Party Cookie Without SameSite

A cookie set in a third-party context (iframe, cross-site redirect) does not specify a SameSite attribute. Modern browsers default to SameSite=Lax and block the cookie in third-party contexts.

Why it matters

The cookie will be blocked by modern browsers (Chrome, Firefox, Safari) in third-party contexts, breaking embedded widget functionality, OAuth flows, or cross-site forms.

When a cookie is omitted SameSite, Chrome 80+ defaults to SameSite=Lax, which blocks the cookie in cross-site subresource requests. For intentional third-party cookies, SameSite=None; Secure is required. For first-party cookies, SameSite=Lax or Strict is safer.

How to fix it

  1. 1For first-party cookies: add SameSite=Lax (default for most login flows) or SameSite=Strict.
  2. 2For intentional third-party cookies: add SameSite=None; Secure; Partitioned.

Code examples

Third-party cookie (CHIPS)

HTTP
Set-Cookie: embed-token=xyz; SameSite=None; Secure; Partitioned; Path=/

First-party SameSite=Lax

HTTP
Set-Cookie: __Host-session=abc123; HttpOnly; Secure; SameSite=Lax; Path=/

References

Detected automatically by VulnRadar. The check id is cookie-no-samesite-third-party, stable across every scan so you can filter or diff on it.

See every cookies check

Questions

How severe is Third-Party Cookie Without SameSite?
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-no-samesite-third-party, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does Third-Party Cookie Without SameSite 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.

Propose a checkHow a check is built

Scan your own site for third-party cookie without samesite

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

How to fix: Third-Party Cookie Without SameSite | VulnRadar