SecurCheckCyber Center
Need help
Back to analysis tools
All cyber threats
Web & network

Cross-Site Request Forgery

Cross-Site Request Forgery (CSRF)

An attacker tricks an authenticated user's browser into performing an action on a website without the user's consent.

Fiche de sensibilisationPrête à diffuser à vos équipes ou clients

MIGHT YOU BE AFFECTED?

Turn knowledge into action.

How does this work?

A malicious page causes the browser to send a request to another site where the victim is already logged in. If the target relies only on session cookies and does not verify the request's origin or an anti-CSRF token, it may accept the action as legitimate.

REAL-WORLD EXAMPLE

« While a banking or account-management tab remains logged in, visiting a hostile page silently submits a request to change the account's recovery email. »

Typical sequence

  1. 1The victim signs in to a legitimate service, creating an authenticated session.
  2. 2The attacker lures the victim to a page that submits a cross-site request.
  3. 3The browser automatically attaches eligible session cookies.
  4. 4The vulnerable service processes an unintended state-changing action.

Warning signs

  • An account setting or transaction changes without the user's request.
  • State-changing endpoints accept requests without an anti-CSRF token or origin validation.
  • Sensitive actions can be triggered from unrelated websites.
  • Unexpected requests coincide with an authenticated session.

How to protect yourself

  • Protect state-changing requests with validated anti-CSRF tokens.
  • Use appropriately configured SameSite cookies and validate Origin or Referer as defence in depth.
  • Require reauthentication or step-up verification for sensitive operations.
  • Avoid using GET requests for operations that change account state.

If you think you are affected

Undo the unauthorised change if possible, revoke active sessions and reset affected credentials from a trusted device. Investigate application and access logs, correct missing request validation and notify affected account holders as appropriate.

Get help

Last updated: 8 October 2026