Content security policy: allows form hijacking
Summary: PortSwigger Research describes how Content Security Policy, a mechanism meant to block cross-site scripting by disabling untrusted JavaScript execution, can be bypassed for form hijacking when the form-action directive is not set. The guidance recommends setting form-action to 'none' when no form actions are used, to 'self' for same-origin-only submissions, and allow-listing external hosts only with the understanding that attackers can then submit to those same resources.
What you should know: A CSP without a form-action directive leaves form destinations uncontrolled, so an injected form can post credentials to an attacker's host even while the policy appears to be enforcing script restrictions.
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