csp-bypass-advanced

Analyzes Content Security Policy configurations to identify bypass vectors and exfiltration channels.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/lNwNl/Praxis --skill csp-bypass-advanced-lnwnl
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: csp-bypass-advanced
Source: https://github.com/lNwNl/Praxis/tree/main/skills/csp-bypass-advanced
Command: npx skills add https://github.com/lNwNl/Praxis --skill csp-bypass-advanced-lnwnl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When XSS or data exfiltration attempts are blocked by a Content Security Policy, testers often stall because base models suggest generic fixes like unsafe-inline without checking the actual policy. This Skill provides a systematic methodology for finding real weaknesses in CSP configurations during authorized web security assessments. ## Core Features & Use Cases - Directive-by-Directive Analysis: Covers bypass techniques for script-src variants ('self', CDN whitelists, nonces, strict-dynamic, unsafe-eval) plus the commonly missed base-uri, form-action, and frame-ancestors gaps that have no default-src fallback. - Exfiltration Channel Catalog: Documents data exfiltration paths CSP cannot block, including DNS prefetch, WebRTC, CSS injection, and form submission, for scenarios where script execution is fully prevented. - Decision Tree Workflow: A structured decision tree walks from reading the raw policy through weakness identification to selecting the appropriate bypass or fallback technique. - Use Case: During a CTF or authorized pentest, you find a reflected XSS but the response sets script-src 'self'. Use this Skill to identify a JSONP endpoint on the same origin or an uploadable .js path to execute the payload. ## Quick Start Analyze the target's Content-Security-Policy header and identify which directives are missing or bypassable, then recommend a concrete exploitation path.

Frequently Asked Questions about csp-bypass-advanced

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bypass CSP script-src 'self' during a pentest?▼

Look for JSONP endpoints on the same origin that reflect the callback parameter as JavaScript, file upload features that accept .js files, DOM XSS sinks in existing same-origin scripts, or Angular/Vue template injection when the framework is loaded from self.

Which CSP directives have no default-src fallback?▼

base-uri, form-action, and frame-ancestors do not fall back to default-src. If they are absent from the policy, they are unrestricted, enabling base tag injection, form-based exfiltration, and clickjacking respectively.

Can data be exfiltrated when CSP blocks all script execution?▼

Yes. DNS prefetch via link tags, WebRTC connections, CSS injection with background URLs, form submissions, and redirect-based navigation can all leak data without JavaScript execution. DNS-based exfiltration is nearly impossible to block with CSP.

How does strict-dynamic change CSP bypass strategy?▼

With strict-dynamic, host allowlists and 'self' are ignored; only nonce/hash trust and trust propagation matter. Bypasses focus on base-uri injection to hijack relative script paths or DOM XSS inside already-trusted scripts.

Why does a CSP nonce bypass fail even with a valid nonce?▼

Common causes include nonce reuse detection, the browser enforcing both a header CSP and a meta CSP simultaneously, or the nonce lacking sufficient entropy checks. Verify whether multiple policies stack and whether the nonce is per-request.