How To Prevent a CSRF Attack
Cross-site request forgery (CSRF) attacks are a form of cyberattack from malicious websites, emails, blogs, instant messages, or applications. This type of attack tricks the user's web browser into executing an unwanted action on a secure website. Browsers typically attach session cookies when making a request to a website. Thus, it becomes difficult for the site to differentiate between legitimate requests that are authorized and forged requests that have been authenticated.