Skip to content
Sharp

OWASP Vulnerabilities · interview question

How does Spring Security validate that a CSRF token is legitimate upon receiving a form submission?

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

Correct answer

C. It checks the token against the session's stored token

Why

Spring Security typically stores the CSRF token in the user's session and compares it with the token submitted in the form to validate its legitimacy.

Test yourself on OWASP Vulnerabilities

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

Start free test
All OWASP Vulnerabilities questions →