hunt-csrf

Detects and validates CSRF vulnerabilities across web applications using bug bounty methodology.

Updated May 29, 2026
One-click install
npx skills add https://github.com/hhjkjkjk/Claude-skills --skill hunt-csrf-hhjkjkjk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: hunt-csrf
Source: https://github.com/hhjkjkjk/Claude-skills/tree/main/skills/hunt-csrf
Command: npx skills add https://github.com/hhjkjkjk/Claude-skills --skill hunt-csrf-hhjkjkjk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Security researchers and bug bounty hunters need a systematic way to find Cross-Site Request Forgery vulnerabilities, especially modern variants that bypass SameSite cookies, JSON Content-Type enforcement, and OAuth state validation. This Skill provides a complete hunting methodology distilled from 15 public bug bounty reports. ## Core Features & Use Cases - Attack Surface Mapping: Identifies high-value CSRF targets through URL patterns, response header signals, JavaScript DOM patterns, and tech stack fingerprints (Rails, Django, Grafana, SAML/OIDC). - Step-by-Step Testing Methodology: Covers token staticness testing, token omission and substitution, JSON-via-text/plain bypasses, OAuth RelayState validation, and social account linking flows. - Bypass Technique Library: Documents bypasses for SameSite=Lax, CSRF tokens, Content-Type enforcement, Referer/Origin checks, double-submit cookies, and custom headers, plus a dedicated section on Duende BFF antiforgery weaknesses. - Use Case: While testing a web application, you notice the session cookie lacks a SameSite attribute. Use this Skill to test token reuse across sessions, build a form-POST PoC, and chain the finding to account takeover via social account linking. ## Quick Start Ask the AI to analyze an authenticated web session for CSRF vulnerabilities using the hunt-csrf methodology, starting with cookie SameSite attributes and CSRF token validation on 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 endpoints, check session cookies for missing SameSite attributes, then test CSRF token omission and cross-session token reuse. If the server accepts requests without a valid token, build a form-POST PoC page to confirm the vulnerability.

How to bypass Content-Type application/json enforcement for CSRF?▼

Submit the request with enctype text/plain using crafted form input names that produce valid JSON when serialized. Browsers treat text/plain as a simple request, so no CORS preflight occurs and cookies are attached cross-origin.

Does SameSite=Lax fully protect against CSRF attacks?▼

No. Top-level GET navigation still carries Lax cookies, so GET-triggered state changes remain exploitable. Sibling subdomains sharing a parent domain can also bypass Lax protections, as demonstrated in the Argo CD CVE-2024-22424 case.

What makes a CSRF finding high severity in bug bounty programs?▼

Severity depends on chaining CSRF to concrete account-level impact such as account takeover via social account linking, email change, or OAuth token association. CSRF on logout or low-impact actions without state-change consequences is typically rejected as not applicable.

Why is OAuth RelayState or state parameter a CSRF concern?▼

The OAuth state and SAML RelayState parameters function as CSRF tokens for authentication flows. When not cryptographically bound to the user's session, attackers can complete account-linking flows on a victim's session, associating attacker-controlled identities for account takeover.

Can WebSocket endpoints be vulnerable to CSRF?▼

Yes. Browsers cannot send custom headers on WebSocket upgrades, so CSRF token headers cannot be enforced. Endpoints relying only on session cookies are vulnerable to cross-site WebSocket hijacking, where a malicious page opens a socket with the victim's ambient credentials.