Skip to content

In-depth lesson · CSRF

Tips for beginners

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

Back to the lesson 1 to 14 of 14
  1. Do not report a missing token on its own. If the endpoint has no meaningful state change, or the action is already gated by a confirmation step or a re-authentication prompt, there is no impact. The evidence is full of endpoints where the fix was to add a token because the action mattered.

    Seen in 6 reports
  2. Be careful with destructive tests. Account deletion, media deletion and password changes affect real state. Use your own accounts, and where a program provides a test environment, use it. Do not run deletion tests against other users.

    Seen in 6 reports
  3. For mobile apps, look at custom-scheme deep links that trigger state changes such as follow or unlock. If the action happens without a confirmation prompt, that is the finding. The evidence shows this pattern repeatedly.

    Seen in 5 reports
  4. Show impact concretely. A proof of concept that changes the victim's email and then completes a password reset is far stronger than one that merely shows a request was accepted. Where takeover is not possible, state the exact state change and who it affects.

    Seen in 5 reports
  5. Check scope before you spend time. Third-party plugins, appliance firmware interfaces and Node.js modules appear in the evidence, but many programs exclude them. Confirm the asset is in scope and that the vulnerable component is the program's responsibility.

    Seen in 5 reports
  6. Start with the actions that hurt most: email change, password change after reset, account deletion, account linking and OAuth initiation. These are where a successful forgery becomes account takeover rather than a nuisance, and the evidence shows they are frequently unprotected.

    Seen in 4 reports
  7. Check the boring endpoints too. Logout, notification read status, cart add and remove, follows, privacy toggles and comment posting are common and easy to demonstrate. A forced logout or an unwanted follow is still a valid finding when the program accepts it.

    Seen in 4 reports
  8. Look at how the request is actually sent. If the endpoint is JSON-only, try whether it also accepts form-encoded input or a method override. If it is GraphQL, try a mutation as a GET or as a form-encoded POST. These are documented bypasses in the evidence, not speculation.

    Seen in 4 reports
  9. Test the token itself, not just its presence. Remove it, change it to an arbitrary value, reuse one from another session, and check whether it stays the same after login or is not tied to the session. A token that is accepted when wrong is no protection.

    Seen in 3 reports
  10. Check cookie attributes and SameSite behaviour. A token stored in a cookie without HttpOnly can be read by scripts, and a Lax cookie may be bypassable with a top-level navigation or method override. Report what you actually observe rather than assuming a bypass works.

    Seen in 3 reports
  11. Consider chains, but only report them when each link is demonstrated. CSRF combined with an open redirect, with cross-site flashing, with permissive CORS, or with a same-origin policy bypass raises impact, and the evidence shows these combinations being paid.

    Seen in 3 reports
  12. Write the report around the root cause and the fix. Say which endpoint lacked which check, what the attacker gains, and what the program should do: require a token and origin check, apply it to GET as well as POST, reject form encoding on JSON endpoints, restrict CORS, or require confirmation for deep links. That matches how these were actually fixed.

    Seen in 3 reports
  13. For OAuth, check whether the state parameter is missing or static across attempts, and whether the initiation request carries a CSRF token. Then test whether a callback can be replayed to link your own third-party account to a victim.

    Seen in 2 reports
  14. Check whether the page is framable and whether the action needs only a click. A state-changing page without frame-ancestors protection and without a token is a clickjacking-assisted CSRF finding, and the evidence shows this being fixed with both controls.

    Seen in 2 reports