csrf-cross-site-request-forgery

Identify and validate CSRF vulnerabilities in state-changing web flows.

5|1|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/Yliken/ai4 --skill csrf-cross-site-request-forgery-yliken
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: csrf-cross-site-request-forgery
Source: https://github.com/Yliken/ai4/tree/main/skills/csrf-cross-site-request-forgery
Command: npx skills add https://github.com/Yliken/ai4 --skill csrf-cross-site-request-forgery-yliken

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

CSRF testing playbook. Use when reviewing state-changing web flows, anti-CSRF defenses, SameSite behavior, JSON CSRF, login CSRF, and OAuth state handling.

Core Features & Use Cases

  • Identify high-value state-changing endpoints (e.g., password change, email change, admin privilege changes, bank transfers, OAuth app authorizations).
  • Demonstrate various token bypass techniques and SameSite edge cases (token absence, token validation flaws, cross-origin cookies, and dual-submit patterns).
  • Assess OAuth CSRF vulnerabilities by missing or misused state parameter and crafting redirect scenarios.
  • Guidance checklist and recommended tests: referer validation, CORS misconfig, referrer, etc.

Quick Start

Run the CSRF playbook against your web app to enumerate CSRF vectors and validate defenses.

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 vulnerabilities in web applications using cookies for sessions?

To test for CSRF vulnerabilities in cookie-based web applications, identify high-value state-changing endpoints like password or email changes, then validate anti-CSRF token presence and behavior to uncover bypass techniques.

Can I bypass SameSite cookie policies to perform cross-site request forgery?

You can test SameSite bypass techniques by probing cross-origin cookie behaviors and edge cases in SameSite policies, checking whether state-changing web flows remain vulnerable despite SameSite cookie restrictions.

How does CSRF testing work with JSON endpoints and OAuth state handling?

CSRF testing for JSON endpoints and OAuth involves validating JSON CSRF vectors and checking for missing or misused OAuth state parameters, crafting redirect scenarios to expose authorization vulnerabilities.

What is the best way to validate anti-CSRF token bypass techniques?

The best way to validate anti-CSRF token bypass techniques is to test token absence, validation flaws, and dual-submit patterns across state-changing web flows to confirm misconfigurations.

Does this CSRF testing methodology apply to login CSRF and referrer validation checks?

Yes, this CSRF testing methodology applies to login CSRF and referrer validation by providing a guidance checklist that tests referer validation, CORS misconfigurations, and other defense mechanisms.

Why do I need a playbook for cross-site request forgery vulnerability assessment?

A CSRF playbook is needed to systematically enumerate CSRF vectors, guiding testers through token bypass, SameSite bypass, JSON CSRF, and OAuth state checks to validate web application defenses.