How CSRF (Cross-Site Request Forgery) Works in Practice
Browsers automatically attach session cookies to cross-site requests unless restricted by SameSite attributes. If a site relies solely on cookies to authenticate a POST /account/email change without checking a secret anti-CSRF token or custom header, a hidden form on an attacker website can submit that request silently when visited.
Defensive Mitigation & Hardening Checklist
Include cryptographically random synchronizer CSRF tokens on state-changing requests, set SameSite=Lax or SameSite=Strict on session cookies, and require re-authentication for sensitive account changes.