Skip to content

Add a note about 'strict-dynamic' allowing injections into non-parser-inserted script URIs to be exploitableΒ #97

@arturjanc

Description

@arturjanc

In the Usage of "'strict-dynamic'" section (https://w3c.github.io/webappsec-csp/#strict-dynamic-usage) we should describe the relaxation of the policy if the attacker controls the URL of a script loaded dynamically via a non-parser-inserted API.

Maybe something like this (rough draft):
"""
Note: With 'strict-dynamic', scripts created at runtime via APIs such as createElement() will be allowed to execute by the policy. If the location of a dynamically created script is controlled by an attacker, the policy will permit the loading of arbitrary external scripts. Developers using applications or frameworks which tend to determine script locations at runtime should audit the uses of non-parser-inserted APIs to add scripts, and make sure they are not invoked with untrusted data.
"""

Context: http://blog.kotowicz.net/2016/06/reflections-on-trusting-csp.html (+ comment thread)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions