hunt-csrf

Detects and validates CSRF vulnerabilities in web applications using browser-accurate exploitation models.

6|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/Wyl-cmd/kxns-cli --skill hunt-csrf-wyl-cmd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hunt-csrf
Source: https://github.com/Wyl-cmd/kxns-cli/tree/main/src/kxns_cli/skills/hunt-csrf
Command: npx skills add https://github.com/Wyl-cmd/kxns-cli --skill hunt-csrf-wyl-cmd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Cross-Site Request Forgery testing often produces false positives because curl-based checks ignore browser security rules like SameSite cookies and CORS preflights. This Skill guides systematic CSRF hunting that models real browser behavior, so findings are exploitable in practice and survive triage. ## Core Features & Use Cases - Browser-accurate verification: Enforces a SameSite/CORS checklist so PoCs work in a real browser, not just curl, eliminating false positives from SameSite=Lax POST blocking. - Modern bypass coverage: Documents SameSite=Lax sibling-subdomain bypasses, GraphQL mutations-via-GET, path-traversal token bypasses, JSON-CSRF via text/plain, WebSocket CSRF (CSWSH), and Duende BFF antiforgery weaknesses. - Chain-to-ATO focus: Prioritizes high-impact targets like OAuth/social account linking, email change, and SAML RelayState manipulation, backed by 15 disclosed bug bounty reports (GitLab, Stripe, GitHub, TikTok, Argo CD). - Use Case: While testing a target's account settings, you find a POST email-change endpoint. The Skill walks you through checking the session cookie's SameSite attribute, testing token omission and cross-session reuse, then building a hosted HTML PoC that proves account takeover in a real browser. ## Quick Start Ask the agent to hunt for CSRF vulnerabilities on the target's authenticated state-changing endpoints and build a browser-verified PoC for any exploitable finding.

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 website for CSRF vulnerabilities?

Map all state-changing POST/PUT/DELETE endpoints, check session cookie SameSite attributes, then test CSRF token omission, cross-session token reuse, and Content-Type downgrades. Confirm exploitability with an HTML PoC hosted on a different origin in a real browser.

Why does my CSRF PoC work in curl but fail in a browser?

Curl ignores browser security rules like SameSite cookie policies and CORS preflights. SameSite=Lax cookies are blocked on cross-site POSTs, so a curl success is a false positive unless the cookie is SameSite=None or the action works via top-level GET navigation.

Can JSON API endpoints be vulnerable to CSRF?

Yes, if the server accepts text/plain or application/x-www-form-urlencoded bodies alongside application/json. An HTML form with enctype=text/plain can send syntactically valid JSON cross-origin without triggering a CORS preflight, as demonstrated in the TikTok and Stripe reports.

What CSRF bypasses work against SameSite=Lax cookies?

SameSite=Lax still allows cookies on top-level GET navigations, so GET-based state changes remain exploitable. Sibling subdomains of the same parent domain also bypass it, and Chrome sends Lax cookies on cross-site POSTs within two minutes of cookie issuance.

When is a CSRF finding not worth reporting?

CSRF on logout or actions without concrete victim impact are routinely closed as not applicable. A valid report requires the victim to lose something tangible, such as account access, money, or data, and a PoC reproducible from scratch in about ten minutes.