csrf-cross-site-request-forgery

Validate CSRF defenses for state-changing web endpoints across browser scenarios.

5|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/DorianGallo/hack-skills-local --skill csrf-cross-site-request-forgery-doriangallo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: csrf-cross-site-request-forgery
Source: https://github.com/DorianGallo/hack-skills-local/tree/main/skills/csrf-cross-site-request-forgery
Command: npx skills add https://github.com/DorianGallo/hack-skills-local --skill csrf-cross-site-request-forgery-doriangallo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you identify and exploit Cross-Site Request Forgery weaknesses in state-changing web flows by systematically testing token handling, SameSite behavior, CORS/JSON pitfalls, and OAuth state protection.

Core Features & Use Cases

  • CSRF target discovery: Pinpoints high-impact endpoints like email/password changes, role changes, payments, and OAuth authorization.
  • Token bypass strategies: Covers missing tokens, non-validated tokens, token/session binding mistakes, cookie-based token flaws, static/predictable tokens, and double-submit patterns.
  • SameSite and browser behavior exploitation: Explores Lax/Strict bypass scenarios, SameSite=None applicability, Lax 2-minute exceptions, and redirect/method-override edge cases.
  • Advanced chains and variants: Includes JSON CSRF, multipart CSRF, CSRF+XSS token bypass, clickjacking-to-CSRF logic, and CSPT2CSRF path-traversal-style abuse.
  • Testing checklist: Provides a structured sequence to validate failures like referrer-based weaknesses, CORS credential misconfigurations, and OAuth state absence.

Quick Start

Use the csrf-cross-site-request-forgery Skill to generate a step-by-step CSRF test plan for a target account email-change endpoint, including SameSite and JSON CSRF checks.

Frequently Asked Questions about csrf-cross-site-request-forgery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test for CSRF token bypass on state-changing web endpoints?

To test for CSRF token bypass, validate token presence and validation correctness on state-changing endpoints by checking for missing tokens, non-validated tokens, session binding mistakes, and static or predictable token patterns.

Can SameSite Lax cookies be bypassed in modern browser scenarios?

SameSite Lax cookies can be bypassed by exploiting Lax 2-minute exceptions, redirect conditions, and method-override edge cases across modern browser scenarios to execute state-changing attacks.

What is JSON CSRF and how does it relate to CORS misconfiguration?

JSON CSRF exploits state-changing endpoints using JSON payloads, often leveraging credentialed CORS misconfigurations that allow cross-origin requests to bypass traditional HTML form POST protections.

How do I generate a step-by-step CSRF test plan for an OAuth authorization flow?

Generate a CSRF test plan for OAuth authorization by checking for state parameter absence, validating callback endpoints, and testing token validation correctness across HTML form POSTs and JSON endpoints.

Does this approach cover CSRF and XSS chains or clickjacking bypass?

This approach covers advanced CSRF and XSS chains, clickjacking-to-CSRF logic, and path-traversal-style abuse, providing proof-of-concept oriented workflows without relying on assumed protection strength.

When should I test multipart CSRF endpoints and content-type handling differences?

Test multipart CSRF endpoints and content-type handling differences when targeting file uploads or complex state-changing requests, ensuring deterministic checks for validation failures across various browser scenarios.