PortSwigger research shows CSP bypass via form-action to steal credentials
A new Burp AT skill finds CSP weaknesses, including form-action credential exfiltration even when scripts are blocked.
Reported by PortSwigger Research
First reported Summary updated
- Public PoC
- Not known
- Exploited
- Not known
- Severity
- Not rated
What happened
PortSwigger researcher Gareth Heyes published research on bypassing Content Security Policy (CSP) to steal credentials, including a technique that works even when all JavaScript is blocked.1
The research introduces a Burp AT skill that analyses CSP headers for allow-list gadgets and form-action credential exfiltration.1
The form-action technique exploits the fact that form-action does not fall back to default-src, allowing a self-posting form to exfiltrate credentials via the Referer header.1
Is there a public exploit?
Not known None of the sources mentions public exploit code yet.
Exploited in the wild?
Not known None of the sources reports attacks using it so far.
For bug hunters
The bug class is CSP misconfiguration, specifically missing or permissive form-action and allow-listed hosts with JSONP or AngularJS gadgets. Look for reflected HTML injection sinks where form-action is 'self' or absent, and check script-src allow-lists for known bypass domains. Test whether injected forms can post back to the page and whether meta refresh or Referer can leak data.
What to test
- Check if form-action is set and whether it allows 'self' or any origin.
- Look for reflected HTML injection points that can host a form.
- Test if a self-posting form can exfiltrate credentials via Referer.
- Review script-src allow-lists for JSONP endpoints or AngularJS libraries.
Written by bugbounty.wiki with AI from its source. Every statement above comes with a quote we checked against the source it cites (the numbers link to it); anything we could not check was left out. It can still be wrong, so read the coverage before relying on a detail.
Coverage
The article this story is based on. Each headline opens the outlet's own article.
-
1
PortSwigger Research
Blind trust: stealing credentials through CSP“Content Security Policy is supposed to be the safety net that stops an HTML injection from turning into XSS.”