GitHub • Buy Me a Coffee • Installation • Usage
Corscan is a focused security tool for detecting CORS misconfigurations, validating exploitability, and exporting professional reports.
It supports single target scans, large URL batch scans, configurable retries, bypass checks, method testing, security header analysis, and multi-format output (text, JSON, CSV, HTML).
This tool is for legal security testing and education only.
You are responsible for having explicit permission to test any target.
- Accurate CORS header parsing and misconfiguration detection
- Risk-based vulnerability decision model
- Severity classification: critical, high, medium, low, none
- Multi-threaded batch scanning
- Retry with exponential backoff
- Optional bypass testing with custom origins
- Optional HTTP methods testing
- Optional security headers analysis
- Optional path discovery for single and file scans (common + custom paths)
- Advanced result filtering (severity, vulnerable-only, URL pattern)
- Flexible output and export options:
- Console output (text/json)
- JSON file export
- CSV file export
- HTML report with charts and branding
- Config file and environment variable support
- Proxy and SSL verification controls
- Python 3.6+
- pip
git clone https://github.com/Angix-Black/Corscan.git
cd Corscan
python setup.py installcorscan --version
corscan --helpCLI aliases:
- corscan
- crsn
corscan [options]| Option | Description | Default |
|---|---|---|
| -u, --url URL | Scan a single URL | - |
| -f, --file FILE | Scan URLs from file (one URL per line) | - |
| --discover-paths | Expand URL targets to scan common paths on same host | false |
| --paths-file FILE | Add custom discovery paths (one path per line) | - |
| -r, --origin ORIGIN | Custom Origin header | https://evil.com |
| -t, --threads NUM | Number of threads for batch scan | 10 |
| --timeout SECONDS | Request timeout | 5 |
| --retries NUM | Retry attempts on failures | 2 |
| --proxy URL | Proxy URL (http://host:port) | - |
| --insecure | Disable SSL verification | false |
| Option | Description |
|---|---|
| --no-bypass | Skip bypass attempts |
| --custom-origin ORIGIN | Add custom origin to bypass tests (repeatable) |
| --test-methods | Test CORS behavior on HTTP methods |
| --analyze-headers | Analyze security headers |
| Option | Description |
|---|---|
| --format text|json | Console output format |
| -o, --output FILE | Save console output to file |
| --json FILE | Export structured JSON file |
| --csv FILE | Export CSV report |
| --html FILE | Generate HTML report |
| Option | Description |
|---|---|
| --filter | Show only vulnerable results (legacy quick filter) |
| --filter-vulnerable | Show only vulnerable URLs |
| --filter-severity LEVEL | Filter by minimum severity: critical|high|medium|low |
| --filter-pattern PATTERN | Keep URLs containing pattern |
| Option | Description |
|---|---|
| --config FILE | Load config from JSON file |
| --save-config FILE | Save current settings to config file |
| -v, --verbose | Verbose logging |
| -h, --help | Show help |
| --version | Show version |
corscan -u https://example.comcorscan -f urls.txtcorscan -u https://example.com --discover-pathscorscan -u https://example.com --discover-paths --paths-file paths.txtcorscan -f urls.txt --discover-pathscorscan -f urls.txt --no-bypass -t 50corscan -f urls.txt --filter-vulnerable --format jsoncorscan -f urls.txt --csv results.csv --json results.json --html report.htmlcorscan -f urls.txt --test-methods --analyze-headerscorscan -f urls.txt --filter-severity highcorscan -f urls.txt --proxy http://127.0.0.1:8080- critical: wildcard origin (*) + credentials true
- high: wildcard origin (*)
- medium: reflective/specific origin match
- low: CORS headers exist but result is not classified as exploitable
- none: no CORS issue detected
Corscan uses a risk-aware model:
- It detects CORS misconfiguration.
- It checks whether sensitive data appears exposed.
- It marks vulnerable as true only when both conditions are met.
That means you may see Allow-Credentials: true with low severity if the endpoint does not expose sensitive data under current test conditions.
- url
- origin
- status_code
- vulnerable
- severity
- cors_headers
- bypass_attempts
- request_time
- error
- URL
- Origin
- Status Code
- Vulnerable
- Severity
- Allow Origin
- Allow Methods
- Allow Headers
- Allow Credentials
- Request Time (s)
- Error
Corscan can load settings from:
- explicit config file passed with --config
- default config paths:
- ~/.corscan/config.json
- ./.corscan/config.json
- ./corscan.json
{
"threads": 10,
"timeout": 5,
"default_origin": "https://evil.com",
"retries": 2,
"retry_backoff": 0.5,
"rate_limit_delay": 0.01,
"test_methods": false,
"analyze_headers": false
}- CORSCAN_THREADS
- CORSCAN_TIMEOUT
- CORSCAN_ORIGIN
- CORSCAN_RETRIES
- CORSCAN_BACKOFF
corscan -f urls.txt --timeout 15 --retries 3 -t 5corscan -u https://target.local --insecurecorscan -f urls.txt -vMake sure each URL contains scheme:
- valid: https://example.com
- invalid: example.com
- CI-friendly exit codes by severity threshold
- Optional SARIF export
- Pluggable risk policies
- Extended report templates
