Testing for cross site request forgery
Check whether state-changing requests can be triggered from another origin without the user's intent.
Goal
Confirm every state-changing request requires a token (or equivalent) that a third-party site cannot supply.
How to test
Build a minimal auto-submitting HTML form pointed at the target action and check whether it succeeds using only the victim’s ambient cookie (no CSRF token, or a stale/other-session one):
<form action="https://example.com/account/email" method="POST">
<input name="email" value="attacker@evil.com">
</form>
<script>document.forms[0].submit()</script>
Also check: is the token validated server-side, or merely present? Does it stay valid across sessions (a non-session-bound token is not protection)?
What to look for
A state-changing action that succeeds without a valid, session-bound CSRF token, relying on the cookie alone.
Notes
A strict SameSite=Lax/Strict cookie mitigates many CSRF cases on modern browsers but is not a substitute for a token — note both independently.
References
- OWASP WSTG-SESS-05 — Testing for Cross Site Request Forgery.