Skip to content

In-depth lesson · CSRF

Typical fixes

Every point the CSRF reports back under this heading, best-backed first, each with the reports it is seen in.

Back to the lesson 51 to 100 of 129
  1. Do not perform state-changing actions on GET requests and require CSRF protection.

    Seen in 1 report
  2. Use a POST request with a CSRF token for account connection callbacks.

    Seen in 1 report
  3. Enforce CSRF protection on all HTTP methods, including GET.

    Seen in 1 report
  4. Do not perform state-changing actions via GET and validate a CSRF token.

    Seen in 1 report
  5. Do not implement state-changing actions as GET requests and require a CSRF token or origin check.

    Seen in 1 report
  6. Require a CSRF token for image upload endpoints.

    Seen in 1 report
  7. Do not derive the CSRF token from the group identifier; use a per-user token.

    Seen in 1 report
  8. Verify a CSRF token and confirm the request originated from the user before posting to Twitter.

    Seen in 1 report
  9. Set the HttpOnly flag on CSRF token cookies.

    Seen in 1 report
  10. Tie the CSRF token to the user session and rotate it.

    Seen in 1 report
  11. Add anti-CSRF protection to the login form.

    Seen in 1 report
  12. Add CSRF protection to the registration form.

    Seen in 1 report
  13. Verify the session token when changing account settings.

    Seen in 1 report
  14. Do not accept a CSRF token from another user session.

    Seen in 1 report
  15. Generate a random authenticity token for each page load.

    Seen in 1 report
  16. Use strict comparison when validating CSRF tokens to prevent type juggling.

    Seen in 1 report
  17. Validate the CSRF token server-side and do not accept arbitrary values.

    Seen in 1 report
  18. Validate the CSRF middleware token server-side in password change requests.

    Seen in 1 report
  19. Implement CSRF token validation.

    Seen in 1 report
  20. Add server-side validation of the CSRF token.

    Seen in 1 report
  21. Require the existing password or a CSRF token before setting a password on a social-login account.

    Seen in 1 report
  22. Require a CSRF token on the API key regeneration endpoint.

    Seen in 1 report
  23. Use a POST request with a fresh, unpredictable, single-use anti-CSRF value instead of a static per-store identifier.

    Seen in 1 report
  24. Add CSRF protection to the domain transfer endpoint.

    Seen in 1 report
  25. Verify the authenticity token against the session instead of comparing it loosely.

    Seen in 1 report
  26. Validate client-supplied element selectors and values in collaboration events.

    Seen in 1 report
  27. Use POST instead of GET for the hook test API endpoint.

    Seen in 1 report
  28. Add CSRF protection to the feedback endpoint.

    Seen in 1 report
  29. Add CSRF protection to the forwarding test endpoint.

    Seen in 1 report
  30. Add CSRF protection to the newsletter form.

    Seen in 1 report
  31. Add a CSRF token to the friend request deletion endpoint.

    Seen in 1 report
  32. Add CSRF protection to the encryption settings endpoint.

    Seen in 1 report
  33. Add CSRF protection to the bank account addition form.

    Seen in 1 report
  34. Add CSRF protection to the donation settings endpoint.

    Seen in 1 report
  35. Add CSRF protection to the support ticket endpoint.

    Seen in 1 report
  36. Add CSRF protection to the SMS captcha step.

    Seen in 1 report
  37. Add CSRF protection to the security question change flow.

    Seen in 1 report
  38. Require the existing password and a CSRF token before setting a password.

    Seen in 1 report
  39. Add CSRF protection and authorisation checks to the deletion endpoint.

    Seen in 1 report
  40. Check ownership of the object identifier and add CSRF protection.

    Seen in 1 report
  41. Fix the Referer validation regex to match the exact origin.

    Seen in 1 report
  42. Expire the authenticity token after a single use.

    Seen in 1 report
  43. Do not include the expected state value in error responses.

    Seen in 1 report
  44. Properly validate the CSRF token on the OAuth2 authorisation endpoint.

    Seen in 1 report
  45. Parse the content type consistently with the underlying HTTP parser and use an allowlist instead of a blacklist.

    Seen in 1 report
  46. Validate the sender of postMessage commands and restrict which methods the background page executes.

    Seen in 1 report
  47. Apply the browser-level CSRF bypass fix.

    Seen in 1 report
  48. Require a valid CSRF token on the logout endpoint.

    Seen in 1 report
  49. Require confirmation for state-changing links in the desktop client.

    Seen in 1 report
  50. Restrict the debug adapter protocol to trusted origins.

    Seen in 1 report