Cross-Site Request Forgery (CSRF) | Computer Security
Using cookies and session tokens to keep a user logged in has some associated security risks. In a cross-site request forgery (CSRF) attack, the attacker forces the victim to make an unintended request. The victim’s browser will automatically attach the session token cookie to the unintended request, and the server will accept the request as coming from the victim. For example, suppose a website has an endpoint http://example.com/logout. To log out, a user makes a GET request to this URL with the appropriate session token attached, and the server checks the session token and performs the logout. If an attacker can trick a victim into clicking this link, the victim will be logged out of the website without their knowledge. CSRF attacks can also be executed on URLs with more malicious actions. For example, a GET request to https://bank.com/transfer?amount=100&recipient=mallory with a valid session token might send $100 to Mallory. An attacker could send an email to the victim with the fo
Cross-Site Request Forgery (CSRF) | Computer Security Skip to main content Menu Expand (external link) Document Search Copy Copied Computer Security 21. Cross-Site Request Forgery (CSRF) 21.1. CSRF Attacks Using cookies and session tokens to keep a user logged in has some associated security risks. In a cross-site request forgery (CSRF) attack, the attacker forces the victim to make an unintended request. The victim’s browser will automatically attach the session token cookie to the unintended request, and the server will accept the request as coming from the victim. For example, suppose a web
Explore this link on the map →saved by
related reading
- Cross-Site Scripting (XSS) | Computer Securitytextbook.cs161.org
- Denial-of-Service (DoS) | Computer Securitytextbook.cs161.org
- Intrusion Detection | Computer Securitytextbook.cs161.org
- Understanding The Web Security Model, Part IV: Cross-Origin Resource Sharing (CORS)educatedguesswork.org
- Understanding The Web Security Model, Part III: Basic Principles and the Origin Concepteducatedguesswork.org
- Part 2: Complete User Authentication: Sessions vs JWT | by Nick Jagodzinski | Mediummedium.com
- All learning materials - detailed | Web Security Academyportswigger.net
- passwords - Demystifying Web Authentication (Stateless Session Cookies) - Information Security Stack Exchangesecurity.stackexchange.com
- JWT should not be your default for sessionsevertpot.com
- What is CORS? Complete Tutorial on Cross-Origin Resource Sharingauth0.com
- Using HTTP cookies - HTTP | MDNdeveloper.mozilla.org
- Introduction to CORS for Go programmers - Eli Bendersky's websiteeli.thegreenplace.net