Question 7 of 10Pro Only

What is a CSRF attack and how do you protect against it?

Sample answer preview

CSRF, Cross-Site Request Forgery, is an attack that forces an authenticated user to execute unwanted actions on a site where they are logged in. Here is how the attack works. A user is logged into their bank in one tab. In another tab, they visit a malicious site.

CSRF tokenSameSiteOriginRefererdouble submitcookies

Unlock the full answer

Get the complete model answer, key points, common pitfalls, and access to 9+ more Backend Developer interview questions.

Upgrade to Pro

Starting at $19/month • Cancel anytime