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
.claude/skills/jeremylongshore-auditing-cors-policy/SKILL.md| 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
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 15,747 | 6,634 | -58% | 1 | 1 | 0% | 613 | 2,139 | +249% | 0 | 0 | — |
case-02 | fail→fail | 6,556 | 6,626 | +1% | 1 | 1 | 0% | 626 | 2,010 | +221% | 0 | 0 | — |
case-03 | fail→fail | 12,557 | 11,264 | -10% | 1 | 1 | 0% | 2,352 | 2,456 | +4% | 0 | 0 | — |
case-04 | fail→pass | 10,400 | 9,393 | -10% | 1 | 1 | 0% | 1,831 | 3,025 | +65% | 0 | 0 | — |
case-05 | fail→pass | 13,307 | 3,660 | -72% | 1 | 1 | 0% | 2,296 | 2,043 | -11% | 0 | 0 | — |
case-06 | fail→pass | 11,491 | 4,438 | -61% | 1 | 1 | 0% | 1,838 | 2,233 | +21% | 0 | 0 | — |
case-07 | pass→pass | 11,482 | 4,687 | -59% | 1 | 1 | 0% | 1,859 | 2,278 | +23% | 0 | 0 | — |
case-08 | pass→pass | 13,167 | 7,384 | -44% | 1 | 1 | 0% | 2,209 | 2,819 | +28% | 0 | 0 | — |
case-09 | pass→pass | 12,753 | 5,657 | -56% | 1 | 1 | 0% | 2,278 | 2,465 | +8% | 0 | 0 | — |
case-10 | fail→pass | 9,983 | 2,187 | -78% | 1 | 1 | 0% | 1,606 | 1,868 | +16% | 0 | 0 | — |
case-11 | pass→pass | 6,657 | 2,315 | -65% | 1 | 1 | 0% | 1,238 | 1,900 | +53% | 0 | 0 | — |
case-12 | fail→pass | 10,587 | 3,303 | -69% | 1 | 1 | 0% | 1,780 | 1,996 | +12% | 0 | 0 | — |
case-13 | fail→pass | 11,411 | 2,903 | -75% | 1 | 1 | 0% | 2,131 | 2,094 | -2% | 0 | 0 | — |
case-14 | fail→pass | 8,445 | 1,697 | -80% | 1 | 1 | 0% | 1,721 | 1,836 | +7% | 0 | 0 | — |
case-15 | pass→pass | 9,797 | 3,868 | -61% | 1 | 1 | 0% | 1,674 | 2,154 | +29% | 0 | 0 | — |
case-16 | fail→pass | 11,399 | 4,853 | -57% | 1 | 1 | 0% | 1,826 | 2,196 | +20% | 0 | 0 | — |
case-17 | pass→pass | 9,280 | 5,356 | -42% | 1 | 1 | 0% | 1,734 | 2,341 | +35% | 0 | 0 | — |
case-18 | fail→pass | 8,759 | 6,382 | -27% | 1 | 1 | 0% | 1,399 | 2,239 | +60% | 0 | 0 | — |
case-19 | fail→pass | 10,421 | 4,662 | -55% | 1 | 1 | 0% | 1,526 | 1,816 | +19% | 0 | 0 | — |
case-20 | pass→pass | 12,379 | 10,368 | -16% | 1 | 1 | 0% | 2,345 | 3,333 | +42% | 0 | 0 | — |
case-21 | pass→pass | 16,559 | 14,797 | -11% | 1 | 1 | 0% | 3,129 | 4,132 | +32% | 0 | 0 | — |
case-22 | pass→pass | 14,590 | 10,332 | -29% | 1 | 1 | 0% | 2,832 | 3,457 | +22% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +45 percentage points is the difference between those two pass rates over the 21 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.