Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear threat model to achieve no scripting #6

Open
shhnjk opened this issue Mar 6, 2020 · 0 comments
Open

Unclear threat model to achieve no scripting #6

shhnjk opened this issue Mar 6, 2020 · 0 comments

Comments

@shhnjk
Copy link

shhnjk commented Mar 6, 2020

This is similar to #2 by @bzbarsky, but how this spec can achieve following goal is bit unclear.

Be able to embed iframes that have same-origin as other frames in the frame tree but not be able to directly script them.

Accessing location.href getter of cross-origin WindowProxy is prohibited but setter isn't. So I think iframe with disallowdocumentaccess attribute can just execute parent.location.href = "javascript:alert(1)" and directly script the parent frame, because existing check of navigating to JavaScript URL is a same-origin check.

Second example I can think of, is if parent frame has a service worker, then the iframe can change CacheStorage content and therefore change either entire content of parent frame or certain subresources in next navigation (assuming that the service worker has event listener to fetch and checks for cache).

The performance benefit makes sense 🙂 But I'm bit worried if people starts using this feature as a security feature, just like sandbox attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant