Skip to content
Sharp

OWASP Vulnerabilities · interview question

Why is it important to include CSRF tokens in forms submitted via JavaScript?

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

Correct answer

C. To validate that the request originates from an authenticated session

Why

Including CSRF tokens in JavaScript-submitted forms helps ensure that the request originates from an authenticated session, preventing CSRF attacks.

Test yourself on OWASP Vulnerabilities

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

Start free test
All OWASP Vulnerabilities questions →