hunt-cors

Tests web applications for exploitable CORS misconfigurations with browser-verified proof of credentialed cross-origin reads.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? CORS findings are frequently reported from curl header output alone, but browsers enforce rules that make most of those findings non-exploitable, producing false positives and rejected reports. This Skill provides an evidence-gated methodology that distinguishes genuinely exploitable CORS misconfigurations from header noise and proves impact with real browser PoCs. ## Core Features & Use Cases - Reflection and null-origin testing: Detects origin reflection combined with Access-Control-Allow-Credentials, and null-origin trust exploitable via sandboxed iframes. - Regex bypass classification: Maps trusted-origin regex flaws (missing end-anchor, unescaped dot, prefix-only, missing dot separator) to the exact bypass payload that matches each flaw class. - Pre-flight and postMessage analysis: Tests OPTIONS pre-flight authorization of arbitrary methods and headers, and audits JavaScript message handlers for missing or weak event.origin checks. - Use Case: While testing an authenticated API at /api/me, you observe the server reflects your Origin header. Use this Skill to confirm ACAC is set, build the browser fetch PoC, and verify the response body is actually readable cross-origin before reporting a High-severity finding. ## Quick Start Use the hunt-cors skill to test https://target.example/api/me for exploitable CORS misconfigurations and build a browser proof of concept.

Frequently Asked Questions about hunt-cors

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

FAQPage Schema
How do I test for CORS misconfiguration on an API endpoint?

Send requests with an attacker-controlled Origin header using curl and check whether the server reflects it in Access-Control-Allow-Origin alongside Access-Control-Allow-Credentials: true. Then confirm exploitability with a browser fetch using credentials: include, since curl does not enforce CORS.

Is Access-Control-Allow-Origin wildcard with credentials exploitable?

No. Browsers refuse to expose responses to credentialed requests when ACAO is a wildcard, so this combination cannot be exploited for cross-origin data theft. It is only relevant if the endpoint serves sensitive data without any authentication.

How do I bypass a CORS trusted-origin regex?

First identify the regex flaw class: missing end-anchor allows target.com.evil.com, a missing escaped dot allows eviltarget.com, and an unescaped dot matches any character. Send the payload matching the specific flaw and check whether the server reflects your registerable origin.

Why does my CORS finding get rejected as a false positive?

Most rejections happen because the finding relies on curl header output without browser proof. Browsers block credentialed reads for wildcard origins and unreflected origins, so a valid High requires a browser PoC showing the authenticated response body is readable from an attacker-controlled origin.

Can a null origin be used to exploit CORS?

Yes, if the server returns Access-Control-Allow-Origin: null with credentials enabled. A sandboxed iframe without allow-same-origin emits Origin: null, letting any page read authenticated responses cross-origin, which should be demonstrated with a browser PoC.

What tools automate CORS misconfiguration scanning?

Corsy performs fast reflection, null-origin, and pre-domain checks, and nuclei has CORS templates under http/misconfiguration/cors. Automated results are only leads; every hit must be re-confirmed in a real browser before reporting.