LESSON 2.3

Cross-site request forgery

09:57·9,842 learners
Alina CostaAlina Costa
Next lesson

In this lesson you will

  • Understand how an ambient credential is abused
  • Set SameSite cookie attributes correctly
  • Validate anti-forgery tokens on state-changing requests

CSRF makes a logged-in user’s browser send a request they never intended. SameSite cookies and anti-forgery tokens close it.

What this lesson covers

  • Understand how an ambient credential is abused
  • Set SameSite cookie attributes correctly
  • Validate anti-forgery tokens on state-changing requests

This lesson sits in Common Web Vulnerabilities, part of Practical Web Security. It assumes what came before it and leads directly into the next lesson in the module.

UP NEXT

3.1 · Sessions versus JWTs

08:12

Practical Web Security

42%

Every lesson, searchable to the second.

© 2026 BIBLION

PRIVACY · TERMS · CONTACT