OWASP Hunting

Browser & protocol

CSRF

CSRF occurs when a browser sends ambient credentials with a cross-site request and the application accepts an unauthorized state change. CORS response readability is not required for a CSRF attack.

Payloads are read from main at 35c1f2b (committed 22 Nov 2026). Project version 1.0.2.

These payloads are for authorized testing only: systems you own, authorized bug bounty programs, or controlled lab environments. Unauthorized testing is illegal.

Payload files

Folder on GitHub

Use the arrow keys to move between payloads. Press Enter or C to copy the focused payload.

csrf-payloads.txt

27 payloads · 3.2 KB
Source

Loading payloads for CSRF…

Common Attack Vectors#

  • HTML forms and state-changing GET endpoints
  • Missing, reused or incorrectly session-bound CSRF tokens
  • Login CSRF and account-linking flows
  • Simple content types accepted by JSON endpoints
  • Origin/Referer validation and SameSite cookie behavior
  • Method overrides and double-submit cookie implementations

Testing Approach#

Use two controlled accounts and a separate test origin. Start with a harmless profile-preference change and verify persisted state in a fresh authenticated read. Run browser fixtures from the separate origin; a proxy replay does not establish that a browser will send the same cookies or headers. Check SameSite and third-party cookie behavior in the browser under test. Origin and Referer header fragments are proxy controls; JavaScript cannot freely set these forbidden headers.

Capture a valid request first, then omit or mutate its CSRF defenses individually. A missing token is a finding only when an unauthorized browser-triggered action succeeds. For double-submit cookies, separately assess whether an attacker can set the cookie used in the comparison. Never change recovery addresses, passwords or real payment details.

References#

Responsible Use

All content in this reference is for authorized security testing only. Use only on systems you own or have explicit written permission to test.

  • Systems and applications you own
  • Authorized penetration testing engagements
  • Bug bounty programs with defined scope
  • Educational lab environments (DVWA, WebGoat, HackTheBox)