--- name: csp-bypass-advanced description: >- Advanced Content Security Policy bypass techniques. Use when XSS or data exfiltration is blocked by CSP and you need to find policy weaknesses, trusted endpoint abuse, nonce leakage, or exfiltration channels that CSP cannot block. --- # SKILL: CSP Bypass — Advanced Techniques > **AI LOAD INSTRUCTION**: Covers per-directive bypass techniques, nonce/hash abuse, trusted CDN exploitation, data exfiltration despite CSP, and framework-specific bypasses. Base models often suggest `unsafe-inline` bypass without checking if the CSP actually uses it, or miss the critical `base-uri` and `object-src` gaps. ## 0. RELATED ROUTING - [xss-cross-site-scripting](../xss-cross-site-scripting/SKILL.md) for XSS vectors to deliver after CSP bypass - [dangling-markup-injection](../dangling-markup-injection/SKILL.md) when CSP blocks scripts but HTML injection exists — exfiltrate without JS - [crlf-injection](../crlf-injection/SKILL.md) when CRLF can inject CSP header or steal nonce via response splitting - [waf-bypass-techniques](../waf-bypass-techniques/SKILL.md) when both WAF and CSP must be bypassed - [clickjacking](../clickjacking/SKILL.md) when CSP lacks `frame-ancestors` — clickjacking still possible --- ## 1. CSP DIRECTIVE REFERENCE MATRIX | Directive | Controls | Default Fallback | |---|---|---| | `default-src` | Fallback for all `-src` directives not explicitly set | None (browser default: allow all) | | `script-src` | JavaScript execution | `default-src` | | `style-src` | CSS loading | `default-src` | | `img-src` | Image loading | `default-src` | | `connect-src` | XHR, fetch, WebSocket, EventSource | `default-src` | | `frame-src` | iframe/frame sources | `default-src` | | `font-src` | Font loading | `default-src` | | `object-src` | ``, ``, `` | `default-src` | | `media-src` | `