BACK TO TOPICS
Intermediate

Cross-Site Request Forgery (CSRF)

1. What is CSRF?

CSRF (Cross-Site Request Forgery) forces an end user to execute unwanted actions on a web application in which they're currently authenticated.

The Mechanism

Browsers automatically include credentials (like session cookies) with cross-site requests. If a user is logged into `bank.com` and visits `evil.com`, `evil.com` can trigger a request to `bank.com`.

Because the browser sends the cookie, `bank.com` thinks the user intended to make the request.

Module Progress

1What is CSRF?
2Attack Scenario
3Defense: SameSite Cookies
4Defense: Anti-CSRF Tokens
5Double Submit Cookie
Progress20%