
Cross-site request forgery (CSRF) makes a logged-in user's browser send a request they did not intend, such as changing their email address or transferring money. The browser automatically attaches the user's cookies, so the application thinks the request is genuine.
The attacker hosts a page with a hidden form or image that targets your site. When a logged-in user visits it, the browser submits the request with their session cookie. Without a CSRF token or a strict SameSite cookie policy, the server cannot tell the forged request from a real one.
SameSite=Lax or Strict.SameSite=Lax or Strict blocks most CSRF, but CSRF tokens are still recommended, especially for older browsers and same-site attack paths.
They can be, if they accept simple content types or rely only on cookies for authentication. Test JSON endpoints too.
Try Vooki Pro free for 7 days
Check every form and API endpoint for CSRF protection in a single scan. The trial unlocks every feature for 7 days, and scanning runs on your own machine.
Related: Insecure file upload · JSON Web Token (JWT) vulnerabilities