CSRF Attack Quiz
Question
What does a CSRF attack exploit?
Hint
It relies on the user being logged in to the target site.
Explanation
CSRF exploits the fact that browsers automatically include cookies (including session cookies) with requests to a domain. A malicious site can trigger a request to the target site, and if the user is logged in, the cookies are sent automatically, making the request appear legitimate. Prevention uses anti-CSRF tokens and SameSite cookie attributes.
Related Resources
Related Lessons
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.