Permissive Cross-Origin Resource Sharing policies can expose authenticated JSON responses to arbitrary third-party domains. The scanner probes origins safely without cookies and inspects every CORS response header.
| Rule ID | Pattern | Risk |
|---|---|---|
CORS-REFLECT-CREDS | Reflects untrusted Origin with Access-Control-Allow-Credentials: true | Allows malicious sites to read authenticated user responses in a victim browser. |
CORS-WILDCARD-CREDENTIALS | Access-Control-Allow-Origin: * paired with credentials | Indicates broken CORS middleware that may fall back to dynamic reflection. |
CORS-REFLECT-NOCREDS | Reflects untrusted Origin without credentials | Exposes semi-private endpoints reachable via corporate network or bearer tokens. |
CORS-WILDCARD | Access-Control-Allow-Origin: * on endpoints | Flags public cross-origin access for verification against intended API behavior. |
web-vuln-scanner https://api.example.com --profile api --json cors-audit.json
Even when you pass -H "Authorization: ..." or -H "Cookie: ..." for authenticated crawling, the scanner strips credentials before sending CORS test origins so external probes stay isolated.
Public read-only endpoints such as unauthenticated status feeds or CDN fonts often intend public cross-origin access. Review CORS-WILDCARD findings against whether the endpoint serves sensitive data.
Replace dynamic origin echoing with an explicit allowlist of exact HTTPS origins and omit Access-Control-Allow-Credentials unless cookies or browser auth headers are required.
Pair CORS tests with OpenAPI contract and anonymous access checks.
Verify SameSite, Secure, and HttpOnly flags alongside cross-origin access.
See how CORS findings map to OWASP ASVS V14.5 verification requirements.