OWASP Hunting

Config & design

CORS Misconfiguration

CORS misconfigurations allow unauthorized origins to read sensitive cross-origin responses, enabling data theft and account takeover.

Payloads are read from main at 35c1f2b (committed 22 Nov 2026). Project version 1.0.2.

These payloads are for authorized testing only: systems you own, authorized bug bounty programs, or controlled lab environments. Unauthorized testing is illegal.

Payload files

Folder on GitHub

Use the arrow keys to move between payloads. Press Enter or C to copy the focused payload.

cors-misconfiguration-payloads.txt

168 payloads · 6.7 KB
Source

Loading payloads for CORS Misconfiguration…

What it is#

CORS misconfiguration occurs when an application incorrectly configures Cross-Origin Resource Sharing headers, allowing unauthorized domains to read sensitive responses. Critical misconfigs include reflecting any Origin with Allow-Credentials: true, accepting null origins, and trusting all subdomains without validation.

Attack vectors#

  • API endpoints with sensitive data
  • Authentication and authorization endpoints
  • User profile and account management APIs
  • Admin panel APIs
  • Internal APIs exposed via CORS

Testing methodology#

  1. Send requests with Origin: https://evil.com and check Access-Control-Allow-Origin
  2. Test with Origin: null (for sandbox or file:// contexts)
  3. Try subdomain variations: Origin: https://evil.target.com
  4. Check if Access-Control-Allow-Credentials: true is set with reflected origins
  5. Test with Origin: https://target.com.evil.com (post-domain matching)

Indicators of vulnerability#

  • Access-Control-Allow-Origin reflects attacker-supplied origin
  • Access-Control-Allow-Credentials: true combined with reflected origin
  • Sensitive API data accessible from attacker's origin

Detection guidance#

Audit all CORS configurations and compare Access-Control-Allow-Origin against a strict allowlist. Never reflect the Origin header verbatim.

Mitigation and remediation#

  • Validate Origin against an explicit allowlist of trusted domains
  • Never reflect the incoming Origin header without validation
  • Avoid using null as an allowed origin
  • Set Access-Control-Allow-Credentials: true only for explicitly trusted origins
  • Apply the same-origin policy as the default; add CORS exceptions only where necessary

References#

Responsible Use

All content in this reference is for authorized security testing only. Use only on systems you own or have explicit written permission to test.

  • Systems and applications you own
  • Authorized penetration testing engagements
  • Bug bounty programs with defined scope
  • Educational lab environments (DVWA, WebGoat, HackTheBox)