CORS Misconfiguration Audit
by Mr Vempire
Audit web applications for six common CORS misconfigurations with request/response evidence and severity grading.
$9.99
CORS Misconfiguration Audit
Example session with this skill installed
Audit https://api.example.app/v1/profile for CORS misconfigurations. I have an active session cookie. Run all six checks and provide the report.
- Read your context and instructions
- Compiled the cors misconfiguration audit
Audit of the specified endpoint is complete. One high-severity misconfiguration was identified regarding subdomain trust logic.
CORS Audit Report: https://api.example.app/v1/profile
| Check | Result | Severity | Finding |
|---|---|---|---|
| 1. Arbitrary Origin | Pass | N/A | Server does not reflect random origins. |
| 2. Null Origin | Pass | N/A | Origin: null is not accepted. |
| 3. Wildcard + Credentials | Pass | N/A | No wildcard used with credentials. |
| 4. Subdomain Trust | FAIL | High | Naive suffix matching allowed app.example.app.attacker.com. |
| 5. Lookalike Domains | Pass | N/A | No other lookalike matches found. |
| 6. Preflight Handling | Pass | N/A | Preflight and GET policies are consistent. |
Finding: Over-broad Subdomain Trust
The server uses a naive suffix match or unanchored regex to validate origins. An attacker can register a domain ending in example.app to bypass the allow-list.
Request:
GET /v1/profile HTTP/1.1
Host: api.example.app
Origin: https://app.example.app.attacker.com
Cookie: session=redacted
Response:
HTTP/1.1 200 OK
Access-Control-Allow-Origin: https://app.example.app.attacker.com
Access-Control-Allow-Credentials: true
Vary: Origin
Fix: Change the origin validation logic to use exact string comparison against a hardcoded allow-list. If regex is required, ensure it is anchored: ^https://app\.example\.app$.
Next steps
- Review the origin validation source code in the backend middleware.
- Deploy the anchored regex fix to the staging environment.
- Re-run the
cors-audit.pyscript to verify the fix.
Connects securely to your tools. The creator never sees your data.
About this skill
CORS misconfigurations are a primary vector for authenticated data theft, yet they often go undetected by generic scanners. This skill performs a targeted security audit of a web application's Cross-Origin Resource Sharing policy to identify exploitable flaws that allow malicious sites to read sensitive responses.
What it does
- Arbitrary origin testing checks if the server reflects any provided
Originheader while allowing credentials. - Null origin validation identifies servers that trust the
nullorigin, a common bypass for sandboxed environments. - Credentialed wildcard detection flags illegal combinations of
*andAccess-Control-Allow-Credentials. - Logic bypass testing probes for over-broad subdomain wildcards and naive regex matches like lookalike domains.
- Preflight consistency audit compares
OPTIONSpreflight responses against actual request handling to find policy mismatches. - Automated scanning uses the
cors-audit.pyutility to run six standardized checks against target URLs.
How it works
- Target mapping identifies sensitive, authenticated API endpoints that return user data.
- Automated probe runs
cors-audit.pyto send crafted headers and capture raw response data. - Manual verification uses the provided proof-of-concept templates to confirm browser-level exploitability.
- Report generation produces a graded audit report following the
report-template.mdstructure.
Frameworks & tools
This skill utilizes a Python-based auditing script (cors-audit.py) using only the standard library for maximum portability. It is designed to work alongside intercepting proxies like Burp Suite or command-line tools like curl.
Why this beats prompting it yourself
Generic prompts often miss the nuances of preflight handling and credentialed vs. non-credentialed reads. This skill provides a structured methodology and a specialized Python tool to ensure evidence-backed findings rather than theoretical guesses.
Use cases
- Penetration testing to find account takeover vectors via authenticated API endpoints.
- Bug bounty hunting to identify high-impact CORS bypasses on public targets.
- CI/CD security gates to verify CORS policy changes before they hit production.
- Compliance audits to document evidence of secure header configurations.
Known limitations
Testing requires an active authenticated session for the target application. It does not identify vulnerabilities unrelated to CORS, such as XSS or CSRF.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 5 days ago
Permissions
Allowed Hosts
What's inside
Frequently Asked Questions
New in Security
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.