Blind Trust: Stealing Credentials Through CSP

Executive Summary

PortSwigger Research details how a misconfigured Content Security Policy (CSP) that allow‑lists a domain can be abused to steal user credentials. By injecting malicious HTML that targets the allowed domain, attackers can bypass CSP’s XSS protection, capture login data, and exfiltrate it. The paper outlines the attack flow, real‑world examples, and recommends tightening CSP directives and validating third‑party domains.

Original Description

Content Security Policy is supposed to be the safety net that stops an HTML injection from turning into XSS. Usually it works. But sometimes it doesn't, because the policy allows-lists a domain that h