Skip to content
Sharp

OWASP Vulnerabilities · interview question

What role does the 'SameSite' cookie attribute play in CSRF prevention?

Multiple choiceMediumchapter-17-curatedpremiumowasp-vulnerabilitiescross-site-request-forgery-csrf
Choose one answer
Answer and explanation

Correct answer

C. It ensures cookies are sent only with requests from the same origin

Why

The 'SameSite' attribute helps prevent CSRF attacks by ensuring that cookies are only sent with requests made from the same origin, blocking cookies from being sent with cross-site requests.

Test yourself on OWASP Vulnerabilities

A free test with instant, explained results. No account needed.

Start free test
All OWASP Vulnerabilities questions →