QUESTION 6 OF 10

What is CSRF and how can an application mitigate it?

Reveal the answer and explore the explanation.

06
HardHigh priority

What is CSRF and how can an application mitigate it?

Answer
Answer

CSRF induces a browser to send an authenticated unwanted request; defenses depend on session design and include origin checks, CSRF tokens and suitable cookie settings.

Practical example

Reject untrusted-origin state-changing requests where cookie authentication is used.

Reference: Further reading ↗

Last 30 min revisionHigh-yield interview Q&As