hunt-csrf

Detects and validates CSRF vulnerabilities in web applications using bug bounty report patterns.

Updated Sep 6, 2026
One-click install
npx skills add https://github.com/inventashif/helpful-code-sidekick --skill hunt-csrf-inventashif
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hunt-csrf
Source: https://github.com/inventashif/helpful-code-sidekick/tree/main/scripts/hackerai/skills/bughunter/hunt-csrf
Command: npx skills add https://github.com/inventashif/helpful-code-sidekick --skill hunt-csrf-inventashif

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Web applications often ship with broken or missing CSRF protections — static tokens, missing SameSite attributes, JSON endpoints accepting text/plain, or unvalidated OAuth state parameters. This Skill gives security researchers a structured methodology to find, confirm, and prove modern CSRF vulnerabilities during authorized bug bounty hunting. ## Core Features & Use Cases - Autonomous Testing Flow: Step-by-step methodology covering token omission, token reuse across sessions, SameSite cookie analysis, and Content-Type enforcement checks with curl commands and grep patterns. - Modern Bypass Techniques: Covers SameSite=Lax sibling-subdomain bypasses, JSON-CSRF via text/plain, path-traversal token bypasses, WebSocket CSRF (CSWSH), and Duende BFF antiforgery weaknesses. - Real Report Grounding: Built from 18 disclosed reports including GitLab ($3,370), Stripe ($5,000), GitHub Enterprise ($10,000), and Argo CD CVE-2024-22424, with PoC HTML templates and impact-chaining guidance toward account takeover. - Use Case: While testing a target's settings page, you notice the email-change POST has no CSRF token. Use this Skill to confirm exploitability with a curl replay, build a form-POST PoC page, and chain it to account takeover for a valid report. ## Quick Start Ask the AI to test the target application's email-change endpoint for CSRF vulnerabilities using this hunting methodology.

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 without its CSRF token using curl or Burp Repeater. If the action succeeds with a 2xx response and no token error, CSRF is confirmed. Also test token reuse across sessions and check SameSite cookie attributes.

How to bypass CSRF protection on JSON API endpoints?

Send the request with a text/plain or application/x-www-form-urlencoded Content-Type instead of application/json, since these are CORS simple requests that skip preflight. Craft form input names so the submitted body parses as valid JSON, which many servers accept.

Does SameSite=Lax fully protect cookies against CSRF?

No. Top-level navigation GET requests still carry Lax cookies, so GET-triggered state changes remain exploitable. Additionally, any sibling subdomain under the same parent domain can send requests that satisfy Lax, as shown in the Argo CD CVE-2024-22424 bypass.

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

Omit the token field entirely, submit an empty value, or reuse a token from another session, since some frameworks only validate format or presence. Also test whether tokens are static per session or shared across users, which makes them leakable.

When should I not report a CSRF finding in bug bounty?

Skip CSRF on login forms, logout endpoints, and read-only GET requests, since these lack a victim session to abuse or concrete impact. Programs expect demonstrable victim loss such as account takeover, financial change, or data modification.

Can CSRF attacks work against WebSocket or mobile app endpoints?

Yes. WebSocket handshakes cannot carry custom antiforgery headers, enabling cross-site WebSocket hijacking when hubs exclude CSRF checks. Mobile apps with exported deeplink handlers may also perform state-changing actions via a link using the ambient session.