CSRF tokens protect against cross-site request forgery attacks.
CSRF tokens are unique and secret tokens that are included in web forms and AJAX requests to prevent unauthorized commands from being transmitted from a user that the web application trusts. For example, in a Java web application, Spring Security can automatically generate and validate CSRF tokens to protect state-changing operations.