Content security policy
Summary: PortSwigger's explainer describes content security policy as a browser mechanism, enabled through a Content-Security-Policy HTTP response header containing directives separated by semicolons, that restricts which resources a page can load and whether other pages can frame it. It notes that policies allowing image requests can still be used to send data to external servers, and that Chrome's script-src-elem directive allows existing script-src directives to be overwritten when input is reflected into a report-uri directive.
Why it matters: A CSP that blocks scripts but permits images still leaves a channel for exfiltrating CSRF tokens, and a reflected report-uri parameter can let an attacker append directives that overwrite the policy itself.
Read the original at PortSwigger Research ↗
- Topics
- Vulnerabilities & Patching
- Related
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command Injection Cyber Risks · Nov 14, 2026U.S. CISA adds Check Point and UnrealIRCd flaws to its Known Exploited Vulnerabilities catalog Cyber Risks · Nov 14, 2026PostgreSQL Patches 52 Flaws, Including 22-Year-Old Bug Enabling Authenticated RCE Cyber Risks · Nov 13, 2026