TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Great SameSite Confusion

2 pointsby aleksandrhalmost 2 years ago

1 comment

aleksandrhalmost 2 years ago
Great article all around.<p>TL;DR: A cross-origin request can still be same site. Also, SameSite cookies do not prevent cookies from being included in malicious requests originating from subdomains because &quot;site&quot; is by definition scheme (e.g., https) plus eTLD+1 (e.g., example.com).<p>Example: <a href="https:&#x2F;&#x2F;subdomain.example.com" rel="nofollow">https:&#x2F;&#x2F;subdomain.example.com</a> can submit a malicious POST to <a href="https:&#x2F;&#x2F;example.com&#x2F;delete-account" rel="nofollow">https:&#x2F;&#x2F;example.com&#x2F;delete-account</a> and the user&#x27;s session cookie would still get included in the request headers. This is why CSRF tokens are commonly employed on top of SameSite cookies as an added layer of protection.