CSP Analysis - Attacking XSS Mitigation
summary
Content Security Policy enforces whitelists, blocks inline JS/CSS and eval/new Function, and sends violation reports to a report-uri; tests show CSP stops plain XSS in most cases but can be bypassed only when another flaw exists. Practical bypasses demonstrated: meta refresh with base64 payload (HTML meta executes encoded JS), utf-7 JSON injection that fools older Firefox versions, image-uploaded text served as .jpg executed by Firefox, and CRLF header injection to append a permissive CSP header on vulnerable servers; each exploit requires a separate server/client weakness.
AI-written summary · about
