OWASP Vulnerabilities · interview question
In a Java web application using Spring Security, what is the primary mechanism for ensuring that a form submission is from the same client who initially requested the form?
Multiple choiceEasychapter-17-curatedpremiumowasp-vulnerabilitiescross-site-request-forgery-csrf
Answer and explanation
Correct answer
D. CSRF token
Why
CSRF tokens are used to ensure requests originate from the original client by being included in forms and validated on submission, preventing third-party sites from forging requests.
Test yourself on OWASP Vulnerabilities
A free test with instant, explained results. No account needed.
More OWASP Vulnerabilities questions
- How would you explain a potential limitation of using only CSRF tokens for preventing CSRF attacks in an interview?
- In a Spring Security filter chain, what is the purpose of filters?
- What role does the 'Signature' play in a JWT?
- Why does the 'signature' in a JWT matter in this design?
- How would you explain a key strategy Java web applications use to protect against Stored XSS attacks in an interview?
- Which of the following best describes a CSRF attack?