Skip to content

The document open steps should set document's CSP to entryDocument's CSP #4510

Closed as not planned
@andypaicu

Description

@andypaicu

In CSP whenever a document (A) has full control over another document's (B) contents it also causes B to inherit A's CSP.
e.g. every local-scheme document inherits it's CSP from the request’s client’s global object (https://w3c.github.io/webappsec-csp/#initialize-document-csp)

I believe the document open steps is similar enough that it should be treated in the same way.

Otherwise CSP can be evaded by abusing a child frame with less restrictive CSP and using document.open/document.write.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions