← Back to Labs

CSRF Decision Path

Pick the request shape and protection layers, then watch where the browser or the server strips away ambient session authority.

ControlsChange one layer at a time and see which branch blocks the attack
Attack shape
Session cookie
Server proof of intent
Sessionstep 1

Victim is logged in with SameSite=Lax on the session cookie.

Requeststep 2

No forged request yet. The attacker still has to choose a browser feature that can reach the bank.

Browserstep 3

The browser is only holding ambient authority at this step. No cross-site decision has been made yet.

Serverstep 4

Origin / Referer check: ON Synchronizer token required No CORS preflight in this shape

OutcomeSafe state

Dormant risk. A cookie in storage is harmless until another site finds a way to spend it.

Exploit shapeWhat the hostile page is trying to send
<form action="https://bank.example/transfers" method="POST">...</form>
HeadersCurrent browser and server decision summary
Request shape: cross-site form POST
Session cookie: SameSite=Lax
Cookie attached: no
Preflight: not used
Server checks Origin / Referer
Token: attacker cannot provide it
Current focusWhich check is being exercised right now
Set-Cookie: session=...; Secure; HttpOnly; SameSite=Lax
Step 1 / 5The victim already holds a session

CSRF starts with a perfectly legitimate login. The problem is what another site can make the browser do with that login later.

Current outcome: Safe state

Arrow keys to navigate · R to reset

Tap dots to jump to any step

Read the full article →Take the quiz →