# CORS Misconfiguration

> Detects insecure Cross-Origin Resource Sharing configurations that allow unauthorized cross-origin access.

- Skill: `zakirkun/cors-misconfiguration` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add zakirkun/cors-misconfiguration`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zakirkun/cors-misconfiguration/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: zakirkun (https://skillmd.com/u/zakirkun)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zakirkun/cors-misconfiguration

---


# CORS Misconfiguration

## Overview
CORS misconfigurations allow attackers to make cross-origin requests that read sensitive API responses from a victim's browser. Common issues:
1. **Wildcard with credentials**: `Access-Control-Allow-Origin: *` combined with credentials is rejected by browsers but misconfiguring the origin reflection is not
2. **Reflected origin**: Origin header value reflected directly without validation
3. **Null origin**: Allowing `null` origin (sandbox iframes)
4. **Subdomain wildcard**: Allowing `*.example.com` which includes attacker-controlled subdomains

## Remediation
- Maintain an explicit allowlist of trusted origins
- Never reflect the `Origin` header directly without validation
- Never allow `null` origin in production
- Do not combine `Access-Control-Allow-Credentials: true` with broad origin policies

