Skip to content
Sharp

OWASP Vulnerabilities · interview question

How does the SameSite cookie attribute contribute to CSRF protection?

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

Correct answer

A. It prevents cookies from being sent with cross-site requests

Why

The SameSite cookie attribute helps prevent CSRF attacks by restricting cookies from being sent along with requests initiated by third-party websites, thereby ensuring cookies are only included in same-site requests.

Test yourself on OWASP Vulnerabilities

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

Start free test
All OWASP Vulnerabilities questions →