# Blind trust: stealing credentials through CSP

DevFeed: [Blind trust: stealing credentials through CSP](<https://devfeed.tech/articles/blind-trust-stealing-credentials-through-csp-129540.md>)

Original publisher: [Read original article](<https://portswigger.net/research/blind-trust-stealing-credentials-through-csp>)

Author: Gareth Heyes

Published: 2026-11-11T14:26:01Z

Content type: article

Language: en

Sources: [PortSwigger Research](<https://devfeed.tech/sources/portswigger-research.md>)

Topics: [frontend security](<https://devfeed.tech/topics/frontend-security.md>), [XSS](<https://devfeed.tech/topics/xss.md>), [Credential theft](<https://devfeed.tech/topics/credential-theft.md>), [Security](<https://devfeed.tech/topics/security.md>)

Tags: [credentials](<https://devfeed.tech/tags/credentials.md>), [csp](<https://devfeed.tech/tags/csp.md>), [security](<https://devfeed.tech/tags/security.md>)

## AI overview

The described Burp AT skill checks CSPs for allow-listed script gadgets and for a credential exfiltration path using a self-posting form. Gadget matching follows the `script-src-elem` -> `script-src` -> `default-src` fallback, browser-style host matching, and requires a gadget to be allowed by every enforced policy. Report-only findings are informational; `strict-dynamic`, nonce or hash gates, and unrestricted inline scripts affect whether a gadget applies. The form check accounts for the fact that `form-action` does not inherit from `default-src`: an omitted directive permits submissions anywhere, while `'self'` can still permit a reflected two-stage form to submit credentials and a payload back to the page, which then redirects to Burp Collaborator. The excerpt's example uses `default-src 'none'` with `form-action 'self'`; the skill reports that vector as viable despite scripts being blocked. When viable, it can build a PoC using the reflected parameter and configured Collaborator domain. The described method depends on a reflected HTML-injection sink.

## Source excerpt

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