Skip to content

Attackers can exploit CSP to block requests to legitimate domains #792

Description

@MartijnCuppens

If an attacker executes the following js, it can restrict all request to only polyfil.io:

document.head.insertAdjacentHTML(
  "beforeend",
  `<meta http-equiv="Content-Security-Policy" content="default-src polyfil.io">`,
);

Is there any way to avoid this from happening?

Metadata

Metadata

Assignees

No one assigned

    Labels

    addition/proposalNew features or enhancementsneeds implementer interestMoving the issue forward requires implementers to express interestneeds testsMoving the issue forward requires someone to write tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions