CORS Misconfiguration

Phase 2Configuration & Deployment Managementconfig mgmtWSTG-CONF

What is CORS Misconfiguration?

Tests Cross-Origin Resource Sharing configuration for wildcard origins, credential leakage, and origin reflection.

This vulnerability class falls under the Configuration & Deployment Management phase of the OWASP Testing Guide (WSTG-CONF). Security engineers prioritise configuration & deployment management checks early in an assessment because weaknesses here provide a foothold that amplifies the severity of vulnerabilities found in later phases.

Security Impact

CORS misconfigurations allow malicious sites to steal data from authenticated users. This module tests for exploitable CORS policies.

Left undetected, cors misconfiguration issues can persist unnoticed for months. Continuous automated scanning ensures your team receives an alert the moment a regression or new exposure is introduced — long before an attacker discovers it through manual enumeration or automated offensive tooling.

How DygDog Detects It

DygDog audits server configuration, exposed file paths, HTTP methods, and deployment artefacts without sending malicious payloads, making the check safe to run continuously in production.

The CORS Misconfiguration check is implemented as a passive scan module, meaning it never sends dangerous payloads or modifies application state. Scans complete in approximately 2.0 s and run continuously in the background so your security posture reflects the current state of your site — not a point-in-time snapshot.

Sample Finding

The following illustrates what a positive CORS Misconfiguration detection looks like in practice.

Observed

API endpoint `/api/user/profile` responds with `Access-Control-Allow-Origin: *` and `Access-Control-Allow-Credentials: true`. The origin from a crafted request (`https://evil.example.com`) is reflected verbatim.

Risk

Combining `Allow-Credentials: true` with a wildcard or reflected origin allows any site to make authenticated API calls on behalf of a logged-in user and read the response — a complete data breach with no user interaction beyond visiting a malicious page.

Fix

Maintain an explicit allowlist of trusted origins. Never combine `Access-Control-Allow-Credentials: true` with `Access-Control-Allow-Origin: *`. In Express: `cors({ origin: ['https://app.yourdomain.com'], credentials: true })`.

Remediation Approach

Harden server and framework defaults by disabling unused HTTP methods, removing version banners from response headers, and applying a principle-of-least-privilege to file permissions and deployment artefacts.

DygDog does not stop at detection. When a CORS Misconfiguration finding is confirmed, the platform generates infrastructure-aware, copy-paste-ready remediation snippets using frontier AI models. Instead of generic advice you need to adapt, you receive code that targets your exact server, framework, and configuration.

OWASP References

This check maps to the following OWASP Testing Guide test cases:

These checks belong to the same testing phase and are often assessed together:

Detect CORS Misconfiguration on Your Site

DygDog runs continuous passive scans across 74 vulnerability checks — including CORS Misconfiguration — and notifies you the moment an issue is detected. Start a free scan in under 60 seconds, no installation required.

Start Free Scan