hunt-csrf

Detects and validates CSRF vulnerabilities in web applications using evidence-gated black-box testing.

10|3|Updated Aug 10, 2026
One-click install
npx skills add https://github.com/baiqigo/baiqi-redteam-lab --skill hunt-csrf-baiqigo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hunt-csrf
Source: https://github.com/baiqigo/baiqi-redteam-lab/tree/main/.agents/skills/hunt-csrf
Command: npx skills add https://github.com/baiqigo/baiqi-redteam-lab --skill hunt-csrf-baiqigo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Modern CSRF defenses (SameSite cookies, token validation, Content-Type enforcement) are frequently misconfigured, and manual testing often misses subtle bypasses like JSON-via-text/plain or sibling-subdomain attacks. This Skill provides a structured, evidence-gated methodology for finding and proving CSRF vulnerabilities during authorized bug bounty and security research engagements. ## Core Features & Use Cases - Autonomous Testing Flow: A prioritized sequence for mapping state-changing endpoints, testing token omission/substitution, and checking SameSite cookie attributes. - Bypass Technique Library: Documented bypasses for SameSite=Lax, Origin/Referer checks, double-submit cookies, and JSON Content-Type enforcement, grounded in 15 real disclosed reports (GitLab, Stripe, GitHub, TikTok, Argo CD). - PoC Templates & Detection Patterns: Ready-to-adapt HTML form payloads, curl commands for token replay, and grep patterns for reconnaissance. - Use Case: While testing a target's account settings page, use the methodology to discover that the email-change endpoint accepts a text/plain body without a CSRF token, then build a cross-origin PoC page demonstrating account takeover. ## Quick Start Use $hunt-csrf to plan an evidence-gated, authorized validation path for CSRF on my target's state-changing endpoints.

Frequently Asked Questions about hunt-csrf

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

FAQPage Schema
How do I test a web application for CSRF vulnerabilities?

Map all state-changing POST/PUT/DELETE endpoints, then replay each request with the CSRF token field omitted entirely. If the action succeeds without a token error, CSRF is confirmed. Also test token reuse across sessions and check whether session cookies lack SameSite=Strict or Lax attributes.

How to bypass Content-Type application/json CSRF protection?

Send the request with enctype text/plain using a crafted form input name so the submitted body parses as valid JSON. Text/plain is a CORS simple request type, so the browser sends it cross-origin without a preflight, and many servers accept it despite expecting application/json.

Does SameSite=Lax fully protect against CSRF attacks?

No. Top-level navigation GET requests still carry Lax cookies, so any state-changing action reachable via GET remains exploitable. Additionally, sibling subdomains under the same parent domain can bypass Lax protections, as demonstrated in the Argo CD CVE-2024-22424 case.

What CSRF token bypass techniques work when a token is present?

Try omitting the token field entirely, sending an empty value, or substituting a token captured from a different session. Many frameworks only validate tokens when present, check format rather than binding, or fail to tie tokens to a specific user session.

When should CSRF findings not be reported in bug bounty programs?

Avoid reporting CSRF on login forms, logout endpoints, or read-only GET actions, since these lack concrete victim impact. A valid report requires a state-changing action where the victim loses something tangible, such as account access, funds, or data.