Skip to content
Sharp

OWASP Vulnerabilities · interview question

Why should CSRF tokens be regenerated after a user logs out and logs back in?

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

Correct answer

A. To decrease the chance of token reuse

Why

Regenerating CSRF tokens after logout and login ensures that old tokens cannot be reused for malicious purposes, reducing the risk of token theft or misuse.

Test yourself on OWASP Vulnerabilities

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

Start free test
All OWASP Vulnerabilities questions →