<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Csrf on Commentary of Takao</title><link>https://takao.blog/en/tags/csrf/</link><description>Recent content in Csrf on Commentary of Takao</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>Commentary of Takao</copyright><lastBuildDate>Sat, 13 Jun 2026 23:11:50 +0900</lastBuildDate><atom:link href="https://takao.blog/en/tags/csrf/index.xml" rel="self" type="application/rss+xml"/><item><title>Mitigating CSRF: SameSite Cookie Attributes and CSRF Tokens</title><link>https://takao.blog/en/web/security-csrf-tokens-samesite-cookies/</link><pubDate>Mon, 25 Aug 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/en/web/security-csrf-tokens-samesite-cookies/</guid><description>&lt;img src="https://takao.blog/img/thumnail.webp" alt="Featured image of post Mitigating CSRF: SameSite Cookie Attributes and CSRF Tokens" /&gt;&lt;h2 id="introduction"&gt;Introduction
&lt;/h2&gt;&lt;p&gt;Cookies are a convenient mechanism for managing user authentication state. When a session ID is stored in a cookie, the browser automatically attaches it to outgoing HTTP requests targeting the domain.&lt;/p&gt;
&lt;p&gt;However, this automatic attachment feature is exploited by &lt;strong&gt;Cross-Site Request Forgery (CSRF)&lt;/strong&gt; attacks.&lt;/p&gt;
&lt;p&gt;Although modern browsers default to safer cookie behaviors (such as applying &lt;code&gt;SameSite=Lax&lt;/code&gt; automatically), developers must understand CSRF defense patterns to prevent serious authentication vulnerabilities. This article reviews SameSite cookie attributes and CSRF token verification patterns.&lt;/p&gt;</description></item></channel></rss>