Yes, an iframe can have a Content Security Policy (CSP) that is more permissive than its parent document's CSP 12. Each document (the main page and each iframe) has its own CSP that is enforced independently by the browser.
For example:
This is because CSP is enforced at the document level, and each document (including iframes) can define its own policy through HTTP headers or meta tags.
However, it's important to note that:
frame-src directive in its CSP to control which sources are allowed to be loaded in frames 3frame-ancestors directive to control which parent documents are allowed to embed it 3This means that while an iframe can technically have a more permissive CSP for its own content, the parent document still has control over which iframes can be loaded in the first place.