Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Audit a target's CORS posture — Access-Control-Allow-Origin handling, reflected-origin bypass, credentials+wildcard mismatch, preflight OPTIONS behavior, Vary header correctness. Use when: a third-party integration is failing CORS preflight and someone proposes "just set Allow-Origin to *" as the fix, OR your bug-bounty inbox has a credential-reuse exploit chain. Threshold: any reflection of arbitrary Origin into Allow-Origin, Allow-Credentials:true with wildcard origin (browser-rejected combo b
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 65% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -11% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 21% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 16% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 12% | 0% |
CORS misconfiguration is one of the most common middle-severity findings in web bug bounties. The browser-enforced rules are subtle, the failure modes are silent (the wrong cors response just works until an attacker weaponizes it), and the "fix" engineers reach for — Access-Control-Allow-Origin: * — opens the very class of attacks CORS was meant to prevent when paired with credentials.
This skill probes each common CORS misconfiguration with synthetic Origin headers and grades the response.
| Finding | Severity | Threshold | Affected control | |---|---|---|---| | Origin reflected without validation | HIGH | Synthetic Origin https://attacker.example echoed in Allow-Origin | OWASP A05:2021 | | Allow-Credentials:true with wildcard Allow-Origin | CRITICAL | Browser rejects but server is asserting the worst combo | OWASP A05:2021 | | Allow-Credentials:true with reflected Origin | CRITICAL | Attacker site can read authenticated responses cross-origin | OWASP A05:2021, CWE-942 | | Subdomain wildcard pattern bypass | HIGH | Allow-Origin: *.example.com matches attacker.example.com.evil.com | CWE-942 | | Missing Vary:Origin on per-origin response | MEDIUM | CDN caches one origin's response for all origins | RFC 7234 | | Preflight cache > 86400s | LOW | Access-Control-Max-Age over 24h limits revocation agility | MDN best practice | | Null Origin trusted | HIGH | Allow-Origin: null accepted (sandboxed iframes, data: URLs) | CWE-942 | | All HTTP methods permitted | MEDIUM | Allow-Methods: * enables CSRF-via-CORS for state-change | OWASP A05:2021 |
requests library)../analyzing-tls-config/references/AUTHORIZATION.md)text"Do you have authorization to perform CORS testing on this target? I need confirmation before proceeding."
bashpython3 ${CLAUDE_PLUGIN_ROOT}/skills/auditing-cors-policy/scripts/audit_cors.py \ https://api.example.com/endpoint \ --authorized
Options:
Usage: audit_cors.py URL [OPTIONS]
Options:
--authorized Attest authorization for non-local targets (required)
--output FILE Write findings to FILE
--format FMT json | jsonl | markdown (default: markdown)
--min-severity SEV (default: info)
--timeout SECS Per-probe timeout (default: 10)
--method METHOD HTTP method for the main probe (default: GET)The scanner sends multiple probes per target:
For each, it records the response's CORS headers and grades against the threshold table above.
CRITICAL = credential-stealing chain available; ship same-day fix. HIGH = arbitrary cross-origin read of public-but-sensitive content; ship within sprint. MEDIUM/LOW = posture hardening; backlog.
If CORS findings land alongside auth findings (skill #20 confirming- pentest-authorization would have caught the auth side at engagement scope), suggest authentication-validator plugin for full session- handling audit.
User: "Bug bounty submission claims CORS bypass on /api/profile."
bashpython3 ${CLAUDE_PLUGIN_ROOT}/skills/auditing-cors-policy/scripts/audit_cors.py \ https://api.example.com/profile \ --authorized \ --format json | jq '.[] | select(.severity == "critical" or .severity == "high")'
If the reflected-origin probe + Allow-Credentials:true both fire, the submission is valid; pay the bounty and ship the fix from PLAYBOOK.md.
User: "We're rolling out a new gateway — audit every endpoint's CORS posture."
bashfor ENDPOINT in $(cat endpoints.txt); do python3 ${CLAUDE_PLUGIN_ROOT}/skills/auditing-cors-policy/scripts/audit_cors.py \ "$ENDPOINT" --authorized --min-severity high --format jsonl >> cors-audit.jsonl done jq -s 'group_by(.severity) | map({sev: .[0].severity, count: length})' cors-audit.jsonl
Drop into deploy gate:
yaml- name: CORS posture gate run: | python3 plugins/security/penetration-tester/skills/auditing-cors-policy/scripts/audit_cors.py \ https://staging-api.example.com/auth \ --authorized \ --min-severity high
Exit 1 fails the deploy if any new high/critical lands.
JSON / JSONL / Markdown per lib/report.py. Exit 0 clean, 1 high/ critical, 2 error.
configured" with note that this is fine for non-cross-origin endpoints.
handler missing.
references/THEORY.md — How CORS works, why each finding mattersreferences/PLAYBOOK.md — Allow-list config templates per servertype / framework (nginx, Express, Spring, FastAPI, Rails)
../analyzing-tls-config/references/AUTHORIZATION.md — Active-scanauthorization pattern
Other measured skills in the registry, with their headline benchmark lift.