Application security

CSRF protection checklist for authenticated web workflows

CSRF matters when a browser can send an authenticated request without the user intentionally authorizing that action. Review state-changing workflows, the credentials automatically attached to requests, and the application’s anti-CSRF controls. Cookie settings and request-origin signals need to be considered with the actual authentication model.

What matters first

  • Identify actions that rely on credentials a browser sends automatically.
  • Use the framework’s supported anti-CSRF mechanism where applicable.
  • Verify sensitive actions and failure paths, not just whether a token field exists.

Identify the workflows that change state

List account changes, invitations, payment settings, content modifications, and administrative operations. Record how each request is authenticated and which browser credentials are attached automatically. This establishes where cross-site request protections are relevant.

Check that methods intended for safe retrieval are not used to perform sensitive changes. Also include endpoints called by embedded widgets, older forms, and mobile webviews. A modern frontend can coexist with an older server route that has different protections.

References: [1] OWASP, [2] OWASP

Review the protection at the trusted boundary

Use the framework’s maintained anti-CSRF support where it fits the architecture. Review token creation, session binding, validation, and error behavior. A token rendered in a form is only useful if the server enforces the expected relationship when processing the protected action.

Origin-related checks and request metadata can provide additional signals when used according to platform guidance. Keep exceptions explicit for integrations and legitimate cross-origin behavior. Do not disable a protection globally to resolve one callback or development-environment issue.

References: [1] OWASP, [3] OWASP

Evaluate cookies and cross-origin assumptions

Choose SameSite behavior appropriate to the supported workflows and review Secure, domain, and path settings. Test sign-in redirects, embedded experiences, and third-party interactions before assuming a stricter cookie setting is compatible with the product.

CORS and CSRF address different questions. A cross-origin response-reading policy does not automatically establish that an authenticated state-changing request is protected. Review what the browser can send, what credentials it attaches, and what the server requires before performing the action.

References: [1] OWASP, [2] OWASP

Verify denial and legitimate behavior

Use controlled accounts and an authorized environment to test missing or invalid anti-CSRF context, legitimate actions, and relevant cross-site scenarios. Confirm that rejection occurs before the sensitive state change, not after a side effect has already been triggered.

Preserve regression cases for new forms, API routes that use cookie authentication, and exceptional integrations. Revisit the policy when changing authentication or embedding the application elsewhere. XSS and session weaknesses can affect the broader security model, so keep those adjacent findings visible in the review.

References: [1] OWASP, [4] OWASP, [5] OWASP

Your next steps

  1. Inventory authenticated state-changing browser workflows and their credential model.
  2. Verify the server-side anti-CSRF control and document exceptions.
  3. Test SameSite and origin-related behavior through real supported flows.
  4. Discuss a focused review of account and administrative actions.

Questions teams ask

Does enabling CORS protect us from CSRF?

Not by itself. CORS primarily controls cross-origin access to responses. Review authenticated request submission and the server’s protection for state-changing actions separately.

Do APIs using tokens need the same CSRF controls as cookies?

It depends on how the browser supplies the credential. Establish the authentication model and automatic credential behavior before deciding which protections are needed.

Sources and editorial notes

Public-source facts are cited above. The review questions and action plans are Cyphen’s guidance for applying those lessons to your own systems. Sources checked on .

  1. OWASP: Cross-Site Request Forgery Prevention Cheat Sheet
  2. OWASP: REST Security Cheat Sheet
  3. OWASP: Session Management Cheat Sheet
  4. OWASP: Cross Site Scripting Prevention Cheat Sheet
  5. OWASP: Web Security Testing Guide