flâneur — a map of the web's best reading

Cross-Site Request Forgery (CSRF) | Computer Security

textbook.cs161.org · 1,102 words · saved by 1 readers

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