Prevent Cross-Site Request Forgery
Talk it through out loud with your AI coach.
The problem
- medium
- Pro
A user logged in to your banking site visits a malicious page, which silently submits a form to your site that transfers money, and the browser sends the user's cookies along with it. Explain this attack and how to defend against it.
What a strong answer covers
- How the attack borrows the victim's existing login without ever seeing it.
- Browser cookie settings that stop credentials travelling with cross-site requests.
- A secret value in genuine forms that a third-party page cannot obtain.
- Further habits that close the gap, especially around actions that change state.
Common mistake: Confusing it with cross-site scripting, or assuming that because the request uses POST it must be safe.
Knowing this is half of it. Saying it clearly out loud is the part the coach helps you practise.
Practise it out loud